Browse Source

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

4
migration/colo.c

@ -455,9 +455,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
/* Note: device state is saved into buffer */
ret = qemu_save_device_state(fb, &local_err);
bql_unlock();
if (ret < 0) {
bql_unlock();
goto out;
}
@ -471,6 +470,7 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
*/
qemu_savevm_state_complete_precopy_iterable(s->to_dst_file, false);
qemu_savevm_state_end(s->to_dst_file);
bql_unlock();
/*
* We need the size of the VMstate data in Secondary side,

Loading…
Cancel
Save