diff options
Diffstat (limited to 'hw/vfio/migration.c')
| -rw-r--r-- | hw/vfio/migration.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 2cdb92356e..815ad8fc93 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -788,6 +788,17 @@ static bool vfio_switchover_ack_needed(void *opaque) return vfio_precopy_supported(vbasedev); } +static int vfio_switchover_start(void *opaque) +{ + VFIODevice *vbasedev = opaque; + + if (vfio_multifd_transfer_enabled(vbasedev)) { + return vfio_multifd_switchover_start(vbasedev); + } + + return 0; +} + static const SaveVMHandlers savevm_vfio_handlers = { .save_prepare = vfio_save_prepare, .save_setup = vfio_save_setup, @@ -806,6 +817,7 @@ static const SaveVMHandlers savevm_vfio_handlers = { * Multifd support */ .load_state_buffer = vfio_multifd_load_state_buffer, + .switchover_start = vfio_switchover_start, }; /* ---------------------------------------------------------------------- */ |