qemu/hw/vfio
Haoqian He e0f300b36d system/runstate: add VM state change cb with return value
This patch adds the new VM state change cb type `VMChangeStateHandlerWithRet`,
which has return value for `VMChangeStateEntry`.

Thus, we can register a new VM state change cb with return value for device.
Note that `VMChangeStateHandler` and `VMChangeStateHandlerWithRet` are mutually
exclusive and cannot be provided at the same time.

This patch is the pre patch for 'vhost-user: return failure if backend crashes
when live migration', which makes the live migration aware of the loss of
connection with the vhost-user backend and aborts the live migration.

Virtio device will use VMChangeStateHandlerWithRet.

Signed-off-by: Haoqian He <haoqian.he@smartx.com>
Message-Id: <20250416024729.3289157-2-haoqian.he@smartx.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-05-14 05:39:14 -04:00
..
amd-xgbe.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ap.c vfio: add vfio_device_get_irq_info() helper 2025-05-09 12:42:28 +02:00
calxeda-xgmac.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ccw.c vfio: add region info cache 2025-05-09 12:42:28 +02:00
container-base.c vfio: add device IO ops vector 2025-05-09 12:42:28 +02:00
container.c vfio: implement unmap all for DMA unmap callbacks 2025-05-09 12:42:28 +02:00
cpr.c vfio: Rename vfio-common.h to vfio-device.h 2025-04-25 09:01:37 +02:00
device.c vfio: add vfio-pci-base class 2025-05-09 12:42:28 +02:00
display.c ui/dmabuf: extend QemuDmaBuf to support multi-plane 2025-05-06 11:57:03 +04:00
helpers.c vfio: Rename vfio-common.h to vfio-device.h 2025-04-25 09:01:37 +02:00
igd.c vfio: add region info cache 2025-05-09 12:42:28 +02:00
iommufd.c vfio: implement unmap all for DMA unmap callbacks 2025-05-09 12:42:28 +02:00
Kconfig hw/vfio: Move the IGD quirk code to a separate file 2020-02-06 11:55:42 -07:00
listener.c vfio/container: pass listener_begin/commit callbacks 2025-05-09 12:42:28 +02:00
meson.build vfio: Introduce new files for VFIO MemoryListener 2025-04-25 09:01:37 +02:00
migration-multifd.c vfio: Rename vfio-common.h to vfio-device.h 2025-04-25 09:01:37 +02:00
migration-multifd.h vfio: Rename vfio-common.h to vfio-device.h 2025-04-25 09:01:37 +02:00
migration.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
pci-quirks.c vfio/pci-quirks: Exclude non-ioport BAR from ATI quirk 2025-03-11 17:01:15 +01:00
pci-quirks.h vfio/pci: introduce config_offset field in VFIOConfigMirrorQuirk 2025-02-11 14:15:19 +01:00
pci.c vfio: add vfio-pci-base class 2025-05-09 12:42:28 +02:00
pci.h vfio: add vfio-pci-base class 2025-05-09 12:42:28 +02:00
platform.c vfio: add vfio_device_get_irq_info() helper 2025-05-09 12:42:28 +02:00
region.c vfio: add read/write to device IO ops vector 2025-05-09 12:42:28 +02:00
spapr.c Various patches loosely related to single binary work: 2025-04-27 12:47:16 -04:00
trace-events vfio: Rename VFIOContainer related services 2025-04-25 09:01:37 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vfio-cpr.h vfio: Introduce new files for CPR definitions and declarations 2025-04-25 09:01:37 +02:00
vfio-display.h vfio: Introduce new files for VFIORegion definitions and declarations 2025-04-25 09:01:37 +02:00
vfio-helpers.h vfio: Move vfio_kvm_device_fd() into helpers.c 2025-04-25 09:01:37 +02:00
vfio-iommufd.h vfio: Introduce a new header file for VFIOIOMMUFD declarations 2025-04-25 09:01:37 +02:00
vfio-listener.h vfio: Introduce vfio_listener_un/register() routines 2025-04-25 09:01:37 +02:00
vfio-migration-internal.h vfio: Move vfio_device_state_is_running/precopy() into migration.c 2025-04-25 09:01:37 +02:00