All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] vhost: fix the IO error after live migration
@ 2025-03-09  9:07 Haoqian He
  2025-03-09  9:07 ` [PATCH 1/3] virtio: add VM state change cb with return value Haoqian He
                   ` (3 more replies)
  0 siblings, 4 replies; 47+ messages in thread
From: Haoqian He @ 2025-03-09  9:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: fengli, yuhua, Raphael Norwitz, Michael S. Tsirkin,
	Stefano Garzarella, Kevin Wolf, Hanna Reitz, Stefan Hajnoczi,
	Paolo Bonzini, Fam Zheng, Alex Williamson, Cédric Le Goater,
	Richard Henderson, open list:Block layer core

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



^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2025-05-11 18:01 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-09  9:07 [PATCH 0/3] vhost: fix the IO error after live migration Haoqian He
2025-03-09  9:07 ` [PATCH 1/3] virtio: add VM state change cb with return value Haoqian He
2025-03-09  9:40 ` [PATCH 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-03-09  9:40   ` [PATCH 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-03-09 16:30     ` Raphael Norwitz
2025-03-11 12:34       ` Haoqian He
2025-03-10 10:07 ` [PATCH 0/3] vhost: fix the IO error after " Lei Yang
2025-03-14 10:15 ` [PATCH v2 " Haoqian He
2025-03-14 10:15   ` [PATCH v2 1/3] virtio: add VM state change cb with return value Haoqian He
2025-03-19 14:50     ` Stefano Garzarella
2025-03-20 12:21       ` Haoqian He
2025-03-24 14:20         ` Stefano Garzarella
2025-03-14 10:15   ` [PATCH v2 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-03-19 15:11     ` Stefano Garzarella
2025-03-20 12:21       ` Haoqian He
2025-03-24 14:25         ` Stefano Garzarella
2025-03-25  8:36           ` Haoqian He
2025-03-25  9:47             ` Stefano Garzarella
2025-03-14 10:15   ` [PATCH v2 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-03-19 15:20     ` Stefano Garzarella
2025-03-20 12:21       ` Haoqian He
2025-03-24 14:31         ` Stefano Garzarella
2025-03-25  8:39           ` Haoqian He
2025-03-25  9:51             ` Stefano Garzarella
2025-03-27  6:53               ` Haoqian He
2025-04-04  7:30                 ` Stefano Garzarella
2025-04-07 11:19                   ` Haoqian He
2025-03-27  6:43   ` [PATCH v3 0/3] vhost: fix the IO error after " Haoqian He
2025-03-27  6:43     ` [PATCH v3 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-03-27  6:43     ` [PATCH v3 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-03-27  6:43     ` [PATCH v3 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-03-31  6:37     ` [PATCH v3 0/3] vhost: fix the IO error after " Lei Yang
2025-04-01 15:18     ` [PATCH v4 " Haoqian He
2025-04-01 15:18       ` [PATCH v4 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-04-01 15:18       ` [PATCH v4 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-04-01 15:18       ` [PATCH v4 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-04-03 21:15         ` Michael S. Tsirkin
2025-04-07 12:25           ` Haoqian He
2025-04-16  2:47       ` [PATCH v5 0/3] vhost: fix the IO error after " Haoqian He
2025-04-16  2:47         ` [PATCH v5 1/3] system/runstate: add VM state change cb with return value Haoqian He
2025-04-16  2:47         ` [PATCH v5 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop Haoqian He
2025-04-16  2:47         ` [PATCH v5 3/3] vhost-user: return failure if backend crash when live migration Haoqian He
2025-04-23  6:45           ` Haoqian He
2025-04-23 10:03             ` Michael S. Tsirkin
2025-04-23 10:04               ` Michael S. Tsirkin
2025-04-17  1:48         ` [PATCH v5 0/3] vhost: fix the IO error after " Lei Yang
2025-05-11 18:00         ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.