Browse Source

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>
master
Lukas Straub 4 weeks ago
committed by Fabiano Rosas
parent
commit
9d13dd0a50
  1. 6
      migration/colo.c

6
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();

Loading…
Cancel
Save