From: Michal Privoznik Date: Tue, 3 Jun 2025 06:27:31 +0000 (+0200) Subject: qemu: Don't accept VIR_DUMP_LIVE flag in qemuDomainCoreDumpWithFormat() X-Git-Tag: v11.5.0-rc1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65bc6b0d4ec9be97b622bc5f71c517bda514c36d;p=thirdparty%2Flibvirt.git qemu: Don't accept VIR_DUMP_LIVE flag in qemuDomainCoreDumpWithFormat() QEMU can't really do live dumps of guest memory. It's because inside of dump_init() the vm_stop() is called basically unconditionally (the only condition is whether vCPUs are running). Hence, there is no way for us to do live dumps and thus honor VIR_DUMP_LIVE flag. Instead of silently pretending the flag works, reject it with appropriate error message. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/646 Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index aef313ae9c..b3b0ee66f8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3162,7 +3162,7 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom, int ret = -1; virObjectEvent *event = NULL; - virCheckFlags(VIR_DUMP_LIVE | VIR_DUMP_CRASH | + virCheckFlags(VIR_DUMP_CRASH | VIR_DUMP_BYPASS_CACHE | VIR_DUMP_RESET | VIR_DUMP_MEMORY_ONLY, -1);