]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration/savevm: Add a compatibility check for capabilities
authorFabiano Rosas <farosas@suse.de>
Tue, 7 Oct 2025 18:42:13 +0000 (15:42 -0300)
committerPeter Xu <peterx@redhat.com>
Mon, 3 Nov 2025 21:04:09 +0000 (16:04 -0500)
commit112b55f0b012d00a50befc8e1aa4abe350f00b01
tree0f4f09d2272bf34d83538f502973b478449cfd9f
parenta8e63c013016f9ff981689189c5b063551d04559
migration/savevm: Add a compatibility check for capabilities

It has always been possible to enable arbitrary migration capabilities
and attempt to take a snapshot of the VM with the savevm/loadvm
commands as well as their QMP counterparts
snapshot-save/snapshot-load.

Most migration capabilities are not meant to be used with snapshots
and there's a risk of crashing QEMU or producing incorrect
behavior. Ideally, every migration capability would either be
implemented for savevm or explicitly rejected.

Add a compatibility check routine and reject the snapshot command if
an incompatible capability is enabled. For now only act on the the two
that actually cause a crash: multifd and mapped-ram.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2881
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20251007184213.5990-1-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/options.c
migration/options.h
migration/savevm.c