Skip to content

vhost-user: Add suspend/resume

Hanna Czenczek qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6vhost-user.rst: Add suspend/resumedocs/interop/vhost-user.rst+33 -25 replies
2/6vhost-vdpa: Move vhost_vdpa_reset_status() uphw/virtio/vhost-vdpa.c+14 -141 reply
3/6vhost: Do not reset suspended devices on stophw/virtio/vhost-vdpa.c hw/virtio/vhost.c include/hw/virtio/vhost-vdpa.h +1 more+22 -711 replies
4/6vhost-user: Implement suspend/resumehw/virtio/vhost-user.c+97 -21 reply
5/6vhost-vdpa: Match vhost-user's status resethw/virtio/vhost-vdpa.c+3 -34 replies
6/6vhost-user: Have reset_status fall back to resethw/virtio/vhost-user.c+2 -07 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchStefan Hajnoczi
1/6
2/6R-b
3/6R-b
4/6R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] vhost-user: Add suspend/resume

Hi,

As discussed on the previous version of the virtio-fs migration series
(https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html),
we currently don’t have a good way to have a vhost-user back-end fully cease all operations, including background operations. To work around this, we reset it, which is not an option for stateful devices like virtio-fs.

Instead, we want the same SUSPEND/RESUME model that vhost-vdpa already has, so that we can suspend back-ends when we want them to stop doing anything (i.e. on VM stop), and resume them later (i.e. on VM resume). This series adds these vhost-user operations to the protocol and implements them in qemu. Furthermore, it has vhost-user and vhost-vdpa do roughly the same thing in their reset paths, as far as possible. That path will still remain as a fall-back if SUSPEND/RESUME is not implemented, and, given that qemu’s vhost-vdpa code currently does not make use of RESUME, it is actually always used for vhost-vdpa (to take the device out of a suspended state).

Hanna Czenczek (6):
vhost-user.rst: Add suspend/resume
vhost-vdpa: Move vhost_vdpa_reset_status() up
vhost: Do not reset suspended devices on stop
vhost-user: Implement suspend/resume
vhost-vdpa: Match vhost-user's status reset
vhost-user: Have reset_status fall back to reset

 docs/interop/vhost-user.rst    |  35 +++++++++++-
 include/hw/virtio/vhost-vdpa.h |   2 -
 include/hw/virtio/vhost.h      |   8 +++
 hw/virtio/vhost-user.c         | 101 ++++++++++++++++++++++++++++++++-
 hw/virtio/vhost-vdpa.c         |  41 ++++++-------
 hw/virtio/vhost.c              |   8 ++-
 6 files changed, 169 insertions(+), 26 deletions(-)
Signature · 1 line
2.41.0