qemu/docs/devel/migration
Maciej S. Szmigiero c59748c1ff vfio/migration: Multifd device state transfer support - load thread
Add a thread which loads the VFIO device state buffers that were received
via multifd.

Each VFIO device that has multifd device state transfer enabled has one
such thread, which is created using migration core API
qemu_loadvm_start_load_thread().

Since it's important to finish loading device state transferred via the
main migration channel (via save_live_iterate SaveVMHandler) before
starting loading the data asynchronously transferred via multifd the thread
doing the actual loading of the multifd transferred data is only started
from switchover_start SaveVMHandler.

switchover_start handler is called when MIG_CMD_SWITCHOVER_START
sub-command of QEMU_VM_COMMAND is received via the main migration channel.

This sub-command is only sent after all save_live_iterate data have already
been posted so it is safe to commence loading of the multifd-transferred
device state upon receiving it - loading of save_live_iterate data happens
synchronously in the main migration thread (much like the processing of
MIG_CMD_SWITCHOVER_START) so by the time MIG_CMD_SWITCHOVER_START is
processed all the proceeding data must have already been loaded.

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/9abe612d775aaf42e31646796acd2363c723a57a.1741124640.git.maciej.szmigiero@oracle.com
[ clg: - Reordered savevm_vfio_handlers
       - Added switchover_start documentation ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-03-06 06:47:34 +01:00
..
best-practices.rst docs/migration: Split "Debugging" and "Firmware" 2024-01-16 11:16:10 +08:00
compatibility.rst include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
CPR.rst migration: cpr-transfer documentation 2025-01-29 11:56:39 -03:00
dirty-limit.rst docs/migration: Split "dirty limit" 2024-01-16 11:16:10 +08:00
features.rst docs/migration: add qatzip compression feature 2024-09-09 10:55:39 -04:00
index.rst docs/migration: Further move virtio to be feature of migration 2024-01-16 11:16:10 +08:00
main.rst docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
mapped-ram.rst docs: use consistent markup for footnotes 2024-10-11 13:48:42 +02:00
postcopy.rst migration/docs: Update postcopy recover session for SETUP phase 2024-06-21 09:47:59 -03:00
qatzip-compression.rst docs/migration: add qatzip compression feature 2024-09-09 10:55:39 -04:00
qpl-compression.rst docs/migration: add qpl compression feature 2024-06-14 14:01:28 -03:00
uadk-compression.rst docs: Fix some typos (found by typos) and grammar issues 2024-08-16 14:12:59 +01:00
vfio.rst vfio/migration: Multifd device state transfer support - load thread 2025-03-06 06:47:34 +01:00
virtio.rst docs/migration: Convert virtio.txt into rST 2024-01-16 11:16:10 +08:00