diff options
| author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2025-03-04 23:03:57 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-03-06 06:47:34 +0100 |
| commit | 6d644baef20303fa4b2b342f556e26c2262b439f (patch) | |
| tree | c9860c64d45af2112ea4875118042ba793a53117 /include/hw/vfio/vfio-common.h | |
| parent | b659c07c534490369ca0954f0116b05c4a063065 (diff) | |
| download | focaccia-qemu-6d644baef20303fa4b2b342f556e26c2262b439f.tar.gz focaccia-qemu-6d644baef20303fa4b2b342f556e26c2262b439f.zip | |
vfio/migration: Multifd device state transfer support - send side
Implement the multifd device state transfer via additional per-device
thread inside save_live_complete_precopy_thread handler.
Switch between doing the data transfer in the new handler and doing it
in the old save_state handler depending if VFIO multifd transfer is enabled
or not.
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/4d727e2e0435e0022d50004e474077632830e08d.1741124640.git.maciej.szmigiero@oracle.com
[ clg: - Reordered savevm_vfio_handlers
- Updated save_live_complete_precopy* documentation ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/vfio/vfio-common.h')
| -rw-r--r-- | include/hw/vfio/vfio-common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 9d72ac1eae..961931d9f4 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -298,6 +298,7 @@ void vfio_mig_add_bytes_transferred(unsigned long val); bool vfio_device_state_is_running(VFIODevice *vbasedev); bool vfio_device_state_is_precopy(VFIODevice *vbasedev); +int vfio_save_device_config_state(QEMUFile *f, void *opaque, Error **errp); int vfio_load_device_config_state(QEMUFile *f, void *opaque); #ifdef CONFIG_LINUX @@ -314,6 +315,11 @@ struct vfio_info_cap_header * vfio_get_device_info_cap(struct vfio_device_info *info, uint16_t id); struct vfio_info_cap_header * vfio_get_cap(void *ptr, uint32_t cap_offset, uint16_t id); + +int vfio_migration_set_state(VFIODevice *vbasedev, + enum vfio_device_mig_state new_state, + enum vfio_device_mig_state recover_state, + Error **errp); #endif bool vfio_migration_realize(VFIODevice *vbasedev, Error **errp); |