qemu/docs/devel
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
..
migration vfio/migration: Multifd device state transfer support - load thread 2025-03-06 06:47:34 +01:00
testing tests/functional: Add a decorator for skipping long running tests 2025-01-30 10:50:56 +01:00
atomics.rst docs: use consistent markup for footnotes 2024-10-11 13:48:42 +02:00
bitops.rst docs: Create bitops.rst as example of kernel-docs 2019-12-17 19:36:57 +01:00
block-coroutine-wrapper.rst block-coroutine-wrapper.py: introduce co_wrapper 2022-12-15 16:07:43 +01:00
build-environment.rst docs/devel: add information on how to setup build environments 2025-01-17 10:45:44 +00:00
build-system.rst docs: use consistent markup for footnotes 2024-10-11 13:48:42 +02:00
clocks.rst hw/clock: Expose 'qtest-clock-period' QOM property for QTests 2024-10-15 11:29:45 +01:00
code-of-conduct.rst docs/devel: add a maintainers section to development process 2022-11-22 09:49:07 +00:00
codebase.rst docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
conflict-resolution.rst docs: Add a QEMU Code of Conduct and Conflict Resolution Policy document 2021-04-01 13:21:02 +02:00
control-flow-integrity.rst docs: add a glossary 2025-01-17 10:45:54 +00:00
crypto.rst docs/devel: Add introduction to LUKS volume with detached header 2024-07-24 10:39:10 +01:00
decodetree.rst docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
docs.rst docs: correct typos 2024-02-20 22:20:48 +03:00
ebpf_rss.rst docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
index-api.rst docs/devel/lockcnt: Convert to rST format 2024-10-15 15:16:17 +01:00
index-build.rst docs/devel: add information on how to setup build environments 2025-01-17 10:45:44 +00:00
index-internals.rst docs: add uefi variable service documentation 2025-03-04 12:07:05 +01:00
index-process.rst rust: add docs 2025-02-07 15:50:59 +01:00
index-tcg.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
index.rst docs/devel: add a codebase section 2025-01-17 10:45:49 +00:00
kconfig.rst docs: document new convention for Kconfig board symbols 2024-05-03 15:47:48 +02:00
loads-stores.rst docs: use consistent markup for footnotes 2024-10-11 13:48:42 +02:00
lockcnt.rst docs/devel/lockcnt: Include kernel-doc API documentation 2024-10-15 15:16:17 +01:00
luks-detached-header.rst docs/devel: Add introduction to LUKS volume with detached header 2024-07-24 10:39:10 +01:00
maintainers.rst docs: use consistent markup for footnotes 2024-10-11 13:48:42 +02:00
memory.rst docs/devel: add some clarifying text for aliases 2022-01-18 12:56:29 +01:00
modules.rst docs: Spell QEMU all caps 2021-11-19 10:16:58 +01:00
multi-process.rst docs: Don't mention "-mem-path" in multi-process.rst 2023-09-19 10:23:21 +02:00
multi-thread-tcg.rst tcg: Remove TCG_OVERSIZED_GUEST 2025-02-18 07:33:42 -08:00
multiple-iothreads.rst docs/devel/multiple-iothreads: Convert to rST format 2024-10-15 15:16:17 +01:00
pci.rst hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
qapi-code-gen.rst qapi: Move and rename qapi/qmp/dispatch.h to qapi/qmp-registry.h 2025-02-10 15:33:29 +01:00
qdev-api.rst docs/devel: split qom-api reference into new file 2023-07-03 12:52:22 +01:00
qom-api.rst docs/devel: split qom-api reference into new file 2023-07-03 12:52:22 +01:00
qom.rst include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{, _WITH_INTERFACES} macros 2024-02-27 13:01:42 +00:00
rcu.rst docs/devel/rcu: Convert to rST format 2024-10-15 15:16:17 +01:00
replay.rst docs/devel: Mention post_load hook restrictions where we document the hook 2024-10-04 18:54:55 +03:00
reset.rst docs/devel/reset: Document reset expectations for DMA and IOMMU 2025-02-21 07:21:25 -05:00
rust.rst docs: rust: update description of crates 2025-02-25 16:18:11 +01:00
s390-cpu-topology.rst docs/s390: Fix wrong command example in s390-cpu-topology.rst 2023-11-28 14:27:18 +01:00
s390-dasd-ipl.rst docs: rstfy s390 dasd ipl documentation 2020-02-26 18:57:07 +01:00
secure-coding-practices.rst docs/secure-coding-practices: Describe how to use 'null-co' block driver 2021-06-02 14:29:14 +02:00
stable-process.rst docs: Fix botched rST conversion of 'submitting-a-patch.rst' 2021-11-22 15:02:38 +01:00
style.rst docs/devel/style: add a section about bitfield, and disallow them for packed structures 2025-01-17 10:45:27 +00:00
submitting-a-patch.rst docs/devel: add b4 for patch retrieval 2025-01-17 10:45:41 +00:00
submitting-a-pull-request.rst docs/devel: add a maintainers section to development process 2022-11-22 09:49:07 +00:00
tcg-icount.rst accel/tcg: Remove CF_LAST_IO 2023-11-14 10:40:54 -08:00
tcg-ops.rst tcg: Introduce the 'z' constraint for a hardware zero register 2025-02-18 08:29:03 -08:00
tcg-plugins.rst docs/devel: update tcg-plugins page 2024-08-16 14:13:07 +01:00
tcg.rst docs/devel: add some front matter to the devel index 2023-07-03 12:52:08 +01:00
tracing.rst tracetool: remove redundant --target-type / --target-name args 2024-03-12 14:52:07 -04:00
trivial-patches.rst docs: Fix botched rST conversion of 'submitting-a-patch.rst' 2021-11-22 15:02:38 +01:00
uefi-vars.rst docs: add uefi variable service documentation 2025-03-04 12:07:05 +01:00
ui.rst docs: Spell QEMU all caps 2021-11-19 10:16:58 +01:00
vfio-iommufd.rst docs/devel: Add VFIO iommufd backend documentation 2023-12-19 19:03:38 +01:00
virtio-backends.rst include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
writing-monitor-commands.rst docs/devel/writing-monitor-commands: Minor improvements 2024-03-04 07:12:40 +01:00
zoned-storage.rst docs/zoned-storage:add zoned emulation use case 2023-05-15 08:19:04 -04:00