From: Peter Xu Date: Tue, 27 Jan 2026 18:52:37 +0000 (-0500) Subject: colo: Forbid VM resume during checkpointing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afbba26fd3996a4850f6dc7dc18a5c05408f0872;p=thirdparty%2Fqemu.git colo: Forbid VM resume during checkpointing COLO will stop the VM during each checkpoint on either PVM or SVM. Accidentally resuming the VM during the window might be fatal because it may cause the RAM and devices state to misalign, corrupting the checkpoint. Hence forbid VM resume during the process. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu Tested-by: Lukas Straub Link: https://lore.kernel.org/qemu-devel/20260127185254.3954634-8-peterx@redhat.com Signed-off-by: Fabiano Rosas --- diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 1ca44fbd72..0c409c27dc 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -84,6 +84,9 @@ void qmp_cont(Error **errp) } else if (runstate_check(RUN_STATE_FINISH_MIGRATE)) { error_setg(errp, "Migration is not finalized yet"); return; + } else if (runstate_check(RUN_STATE_COLO)) { + error_setg(errp, "COLO checkpoint in progress"); + return; } for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {