QE tested this series of patches with virtio-net regression tests, everything works fine.
Tested-by: Lei Yang <leiy...@redhat.com> On Sun, Mar 9, 2025 at 5:09 PM Haoqian He <haoqian...@smartx.com> wrote: > > At the end of the VM live migration, the vhost device will be stopped. > Currently, if the vhost-user backend crash, vhost device's set_status() > would not return failure, live migration won't perceive the disconnection > with the backend. After the live migration is successful, the stale inflight > IO would be submitted to the migration target host, which may leading to > the IO error. > > The following patch series fixes the issue by making the live migration > aware of the lost of connection with the vhost-user backend and aborting > the live migration. > > Haoqian He (3): > virtio: add VM state change cb with return value > vhost: return failure if stop virtqueue failed in vhost_dev_stop > vhost-user: return failure if backend crash when live migration > > hw/block/vhost-user-blk.c | 29 +++++++++++++++------------ > hw/block/virtio-blk.c | 2 +- > hw/core/vm-change-state-handler.c | 14 +++++++------ > hw/scsi/scsi-bus.c | 2 +- > hw/scsi/vhost-scsi-common.c | 11 +++++----- > hw/scsi/vhost-user-scsi.c | 20 ++++++++++-------- > hw/vfio/migration.c | 2 +- > hw/virtio/vhost.c | 27 ++++++++++++++----------- > hw/virtio/virtio.c | 25 ++++++++++++++++------- > include/hw/virtio/vhost-scsi-common.h | 2 +- > include/hw/virtio/vhost.h | 8 +++++--- > include/hw/virtio/virtio.h | 1 + > include/system/runstate.h | 11 +++++++--- > system/cpus.c | 4 ++-- > system/runstate.c | 25 ++++++++++++++++++----- > 15 files changed, 115 insertions(+), 68 deletions(-) > > -- > 2.48.1 > >