From 604492a991ee74a910d40ef94482f1d489ae249b Mon Sep 17 00:00:00 2001 From: Lukas Straub Date: Mon, 2 Mar 2026 12:45:26 +0100 Subject: [PATCH] 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 Signed-off-by: Lukas Straub Link: https://lore.kernel.org/qemu-devel/20260302-colo_unit_test_multifd-v11-11-d653fb3b1d80@web.de Signed-off-by: Fabiano Rosas --- migration/colo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index dc7cfa81ef..3297aa593c 100644 --- a/migration/colo.c +++ b/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,