qemu/system
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
..
arch_init.c system: Replace arch_type global by qemu_arch_available() helper 2025-03-11 20:03:26 +01:00
async-teardown.c qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd() 2024-08-05 08:21:59 +10:00
balloon.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
bootdevice.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cpu-timers.c include/exec: Split out icount.h 2025-04-23 14:08:44 -07:00
cpus.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
datadir.c pc-bios: Move device tree files in their own subdir 2025-04-25 17:09:58 +02:00
device_tree-stub.c hw/core/machine.c: Make -machine dumpdtb=file.dtb with no DTB an error 2025-02-25 15:32:57 +00:00
device_tree.c hw/core/machine.c: Make -machine dumpdtb=file.dtb with no DTB an error 2025-02-25 15:32:57 +00:00
dirtylimit.c Miscellaneous patches for 2025-04-24 2025-04-24 13:44:57 -04:00
dma-helpers.c include/exec: Split out icount.h 2025-04-23 14:08:44 -07:00
globals-target.c system: Extract target-specific globals to their own compilation unit 2025-03-11 20:03:26 +01:00
globals.c accel/tcg: Restrict 'icount_align_option' global to TCG 2025-03-06 15:46:17 +01:00
ioport.c include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
main.c system/main: transfer replay mutex ownership from main thread to main loop thread 2025-04-14 11:03:16 -04:00
memory-internal.h system/memory: Remove DEVICE_HOST_ENDIAN definition 2025-04-25 17:09:58 +02:00
memory.c util: exclude mmap-alloc.c from compilation target on Emscripten 2025-05-06 16:02:04 +02:00
memory_ldst.c.inc memory: pass MemTxAttrs to memory_access_is_direct() 2025-02-12 11:33:05 -05:00
memory_mapping.c include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
meson.build system: Move most files to libsystem_ss 2025-04-23 14:08:39 -07:00
physmem.c * ci: enable RISC-V cross jobs 2025-05-07 16:10:59 -04:00
qdev-monitor.c system: Replace arch_type global by qemu_arch_available() helper 2025-03-11 20:03:26 +01:00
qemu-seccomp.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
qtest.c exec: Rename target_words_bigendian() -> target_big_endian() 2025-04-25 17:00:42 +02:00
rtc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
runstate-action.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
runstate-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
runstate.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
tpm-hmp-cmds.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
tpm.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
trace-events physmem: fd-based shared memory 2025-01-29 11:43:04 -03:00
trace.h system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
vl.c * ci: enable RISC-V cross jobs 2025-05-07 16:10:59 -04:00
watchpoint.c include/exec: Split out watchpoint.h 2025-04-23 14:08:36 -07:00