aboutsummaryrefslogtreecommitdiff
path: root/docs/devel/migration
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2025-03-04 23:03:57 +0100
committerCédric Le Goater <clg@redhat.com>2025-03-06 06:47:34 +0100
commit6d644baef20303fa4b2b342f556e26c2262b439f (patch)
treec9860c64d45af2112ea4875118042ba793a53117 /docs/devel/migration
parentb659c07c534490369ca0954f0116b05c4a063065 (diff)
downloadqemu-6d644baef20303fa4b2b342f556e26c2262b439f.zip
qemu-6d644baef20303fa4b2b342f556e26c2262b439f.tar.gz
qemu-6d644baef20303fa4b2b342f556e26c2262b439f.tar.bz2
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 'docs/devel/migration')
-rw-r--r--docs/devel/migration/vfio.rst19
1 files changed, 17 insertions, 2 deletions
diff --git a/docs/devel/migration/vfio.rst b/docs/devel/migration/vfio.rst
index d6cf608..a803a09 100644
--- a/docs/devel/migration/vfio.rst
+++ b/docs/devel/migration/vfio.rst
@@ -71,11 +71,23 @@ VFIO implements the device hooks for the iterative approach as follows:
reassembles the multifd received data and loads it in-order into the device.
In the non-multifd mode this function is a NOP.
-* A ``save_state`` function to save the device config space if it is present.
+* A ``save_state`` function to save the device config space if it is present
+ in the non-multifd mode.
+ In the multifd mode it just emits either a dummy EOS marker.
* A ``save_live_complete_precopy`` function that sets the VFIO device in
_STOP_COPY state and iteratively copies the data for the VFIO device until
the vendor driver indicates that no data remains.
+ In the multifd mode it just emits a dummy EOS marker.
+
+* A ``save_live_complete_precopy_thread`` function that in the multifd mode
+ provides thread handler performing multifd device state transfer.
+ It sets the VFIO device to _STOP_COPY state, iteratively reads the data
+ from the VFIO device and queues it for multifd transmission until the vendor
+ driver indicates that no data remains.
+ After that, it saves the device config space and queues it for multifd
+ transfer too.
+ In the non-multifd mode this thread is a NOP.
* A ``load_state`` function that loads the config section and the data
sections that are generated by the save functions above.
@@ -184,8 +196,11 @@ Live migration save path
Then the VFIO device is put in _STOP_COPY state
(FINISH_MIGRATE, _ACTIVE, _STOP_COPY)
.save_live_complete_precopy() is called for each active device
- For the VFIO device, iterate in .save_live_complete_precopy() until
+ For the VFIO device: in the non-multifd mode iterate in
+ .save_live_complete_precopy() until
pending data is 0
+ In the multifd mode this iteration is done in
+ .save_live_complete_precopy_thread() instead.
|
(POSTMIGRATE, _COMPLETED, _STOP_COPY)
Migraton thread schedules cleanup bottom half and exits