qemu/hw/block
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
..
dataplane include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
block.c pflash: fix cpr 2025-03-14 09:29:19 -03:00
cdrom.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
fdc-internal.h hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus 2024-02-14 06:09:32 -05:00
fdc-isa.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
fdc-sysbus.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
fdc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hd-geometry.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
Kconfig hw/block: Remove ecc 2024-10-15 15:16:17 +01:00
m25p80.c qom: Constify TypeInfo::class_data 2025-04-25 17:00:41 +02:00
m25p80_sfdp.c hw/block/m25p80: Add SFDP table for w25q80bl flash 2024-10-24 07:57:47 +02:00
m25p80_sfdp.h hw/block/m25p80: Add SFDP table for w25q80bl flash 2024-10-24 07:57:47 +02:00
meson.build hw/block: Remove ecc 2024-10-15 15:16:17 +01:00
nand.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pflash_cfi01.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pflash_cfi02.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
swim.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
trace-events hw/pflash: implement update buffer for block writes 2024-01-19 12:28:59 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-user-blk.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
virtio-blk-common.c virtio-blk: add zoned storage emulation for zoned devices 2023-05-15 08:18:10 -04:00
virtio-blk.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
xen-block.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
xen_blkif.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00