qemu-cr16/tests/qtest/migration
Juraj Marcin 7b842fe354 migration: Introduce POSTCOPY_DEVICE state
Currently, when postcopy starts, the source VM starts switchover and
sends a package containing the state of all non-postcopiable devices.
When the destination loads this package, the switchover is complete and
the destination VM starts. However, if the device state load fails or
the destination side crashes, the source side is already in
POSTCOPY_ACTIVE state and cannot be recovered, even when it has the most
up-to-date machine state as the destination has not yet started.

This patch introduces a new POSTCOPY_DEVICE state which is active while
the destination machine is loading the device state, is not yet running,
and the source side can be resumed in case of a migration failure.
Return-path is required for this state to function, otherwise it will be
skipped in favor of POSTCOPY_ACTIVE.

To transition from POSTCOPY_DEVICE to POSTCOPY_ACTIVE, the source
side uses a PONG message that is a response to a PING message processed
just before the POSTCOPY_RUN command that starts the destination VM.
Thus, this feature is effective even if the destination side does not
yet support this new state.

Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Link: https://lore.kernel.org/r/20251103183301.3840862-9-jmarcin@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
2025-11-03 16:04:10 -05:00
..
aarch64
i386
ppc64
s390x
bootfile.c migration-test: misc exports 2025-10-01 17:09:22 -03:00
bootfile.h migration-test: misc exports 2025-10-01 17:09:22 -03:00
compression-tests.c tests/qtest/migration: add postcopy tests with multifd 2025-05-20 11:26:32 -04:00
cpr-tests.c migration-test: test cpr-exec 2025-10-03 09:48:02 -04:00
file-tests.c tests/qtest/migration: consolidate set capabilities 2025-05-02 11:09:36 -04:00
framework.c migration-test: migrate_args 2025-10-01 17:09:23 -03:00
framework.h migration-test: migrate_args 2025-10-01 17:09:23 -03:00
Makefile
migration-qmp.c migration-test: strv parameter 2025-10-01 17:09:23 -03:00
migration-qmp.h migration-test: strv parameter 2025-10-01 17:09:23 -03:00
migration-util.c tests/qtest/migration: Introduce migration_test_add_suffix 2025-02-14 15:19:06 -03:00
migration-util.h tests/qtest/migration: Introduce migration_test_add_suffix 2025-02-14 15:19:06 -03:00
misc-tests.c tests/qtest/migration: consolidate set capabilities 2025-05-02 11:09:36 -04:00
postcopy-tests.c tests/qtest/migration: add postcopy tests with multifd 2025-05-20 11:26:32 -04:00
precopy-tests.c migration: Introduce POSTCOPY_DEVICE state 2025-11-03 16:04:10 -05:00
tls-tests.c tests/qtest/migration: add postcopy tests with multifd 2025-05-20 11:26:32 -04:00