colo: Hold the BQL while sending ram state
qemu_savevm_state_complete_precopy() requires that BQL is held. This fixes a crash when running with TCG accel. 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-11-d653fb3b1d80@web.de Signed-off-by: Fabiano Rosas <farosas@suse.de>
Lukas Straub committed
Mar 2, 2026 at 12:45 UTC
604492a991ee74a910d40ef94482f1d489ae249b
1 file changed
+2
-2
migration/colo.c
+2
-2
@@ -455,9 +455,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
455
456
/* Note: device state is saved into buffer */
457
ret = qemu_save_device_state(fb, &local_err);
458
-
459
- bql_unlock();
458
if (ret < 0) {
459
+ bql_unlock();
460
goto out;
461
}
462
@@ -471,6 +470,7 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
470
*/
471
qemu_savevm_state_complete_precopy_iterable(s->to_dst_file, false);
472
qemu_savevm_state_end(s->to_dst_file);
473
+ bql_unlock();
474
475
/*
476
* We need the size of the VMstate data in Secondary side,