From: Andrea Bolognani Date: Thu, 7 Aug 2025 15:49:09 +0000 (+0200) Subject: qemu: Don't add memballoon to isapc X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80eb60354e48b3cd51ce5e2f1591c1d9f62b9b75;p=thirdparty%2Flibvirt.git qemu: Don't add memballoon to isapc The isapc machine type doesn't support PCI, so adding a memballoon (which is a PCI device) to it doesn't make sense. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c index 3c481ead5e..ab39dfe138 100644 --- a/src/qemu/qemu_postparse.c +++ b/src/qemu/qemu_postparse.c @@ -1252,12 +1252,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, switch (def->os.arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: - addDefaultMemballoon = true; - if (STREQ(def->os.machine, "isapc")) { break; } + addDefaultMemballoon = true; addDefaultUSB = true; if (qemuDomainIsQ35(def)) { diff --git a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args index f1d443a0cc..789b7de0ed 100644 --- a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args +++ b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args @@ -27,6 +27,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x1"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml index d4c04045dc..a32f3243d5 100644 --- a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml @@ -21,8 +21,5 @@