[Virtio-fs] [PATCH v2 0/4] vhost-user: Back-end state migration

Hanna Czenczek hreitz at redhat.com
Wed Jul 12 11:16:58 UTC 2023


RFC:
https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg04263.html

v1:
https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html

Based-on: <20230711155230.64277-1-hreitz at redhat.com>
          (“[PATCH 0/6] vhost-user: Add suspend/resume”)
https://lists.nongnu.org/archive/html/qemu-devel/2023-07/msg02450.html


Hi,

Most of the feedback on v1 focused on how to properly stop a device that
has internal state, both for the purpose of migration and just plainly
for VM stop/cont.  I hope this is resolved by my vhost-user
suspend/resume series, which this series here is based on (linked
above).

Therefore, these patches here for the actual state transfer have changed
only little since v1:

- I’ve removed the original patch 1 that would explicitly re-enable all
  vrings every time after using SET_FEATURES with
  VHOST_USER_F_PROTOCOL_FEATURES, replacing it with the stand-alone
  patch “[PATCH] vhost-user.rst: Clarify enabling/disabling vrings”
  (20230712091704.15589-1-hreitz at redhat.com), which does not change
  behavior but only documentation

- In its place, I’ve added a patch that adds documentation on the
  protocol additions.

- Patch 2: Drastically shortened the commit message, this documentation
  is now where it should be, namely in vhost-user.rst (added by patch
  1).  Also rebased on the “Add suspend/resume” series, which adds
  feature bits and vhost-user operations of its own.

- Patch 3: Instead of checking dev->started to see that the device is
  stopped, we might now want to check dev->suspended instead.  However,
  this is only set if the device actually supports suspending, so in
  fact we cannot use it.  Added documentation on this fact.
  (Dropped checking enable_vqs, because this variable had been added
  only by the old patch 1, which I dropped.)


Hanna Czenczek (4):
  vhost-user.rst: Migrating back-end-internal state
  vhost-user: Interface for migration state transfer
  vhost: Add high-level state save/load functions
  vhost-user-fs: Implement internal migration

 docs/interop/vhost-user.rst       |  87 +++++++++++
 include/hw/virtio/vhost-backend.h |  24 +++
 include/hw/virtio/vhost.h         | 114 ++++++++++++++
 hw/virtio/vhost-user-fs.c         | 101 ++++++++++++-
 hw/virtio/vhost-user.c            | 147 ++++++++++++++++++
 hw/virtio/vhost.c                 | 241 ++++++++++++++++++++++++++++++
 6 files changed, 713 insertions(+), 1 deletion(-)

-- 
2.41.0



More information about the Virtio-fs mailing list