Commit 9d13dd0a50 for qemu.org
commit 9d13dd0a509bc21f6d9c25cc0331d3d51067edf0
Author: Lukas Straub <lukasstraub2@web.de>
Date: Mon Mar 2 12:45:27 2026 +0100
colo: Do not hold the BQL while receiving ram state.
We only receive ram into the colo cache here and don't touch anything
else, so the BQL is not needed here.
Move cpu_synchronize_all_states() downwards, before we apply the received
checkpoint. It turns out that qemu_system_reset() already calls it
for us.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Link: https://lore.kernel.org/qemu-devel/20260302-colo_unit_test_multifd-v11-12-d653fb3b1d80@web.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
diff --git a/migration/colo.c b/migration/colo.c
index 3297aa593c..ce02c71d88 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -686,11 +686,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,
return;
}
- bql_lock();
- cpu_synchronize_all_states();
ret = qemu_loadvm_state_main(mis->from_src_file, mis, errp);
- bql_unlock();
-
if (ret < 0) {
return;
}
@@ -733,6 +729,8 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,
* With colo we load device vmstate during each checkpoint, on top of
* a vm that was already running. Some devices expect a reset before
* loading vmstate on such a previously running vm.
+ *
+ * NOTE: qemu_system_reset() calls cpu_synchronize_all_states() for us
*/
qemu_system_reset(SHUTDOWN_CAUSE_SNAPSHOT_LOAD);
colo_flush_ram_cache();