]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't add memballoon to isapc
authorAndrea Bolognani <abologna@redhat.com>
Thu, 7 Aug 2025 15:49:09 +0000 (17:49 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 6 Oct 2025 09:15:35 +0000 (11:15 +0200)
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 <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_postparse.c
tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args
tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml

index 3c481ead5ec3c29e9f0ccb0acca71d71316dca76..ab39dfe13899061a0c4567d56ca07a57b0706fff 100644 (file)
@@ -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)) {
index f1d443a0ccae6859df9f08b4d2e500865665e669..789b7de0edc9cc8c9c59f0ba7249518989e0198b 100644 (file)
@@ -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
index d4c04045dc891b52c47feeb2b4d65aa4fa73b939..a32f3243d5b2affefe91106fde1bbe6cae4ad5a8 100644 (file)
@@ -21,8 +21,5 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
-    </memballoon>
   </devices>
 </domain>