[libvirt PATCH 3/6] qemu: always assume QEMU_CAPS_*_HOLE64_SIZE

Ján Tomko jtomko at redhat.com
Fri Aug 19 14:45:32 UTC 2022


Introduced back in 2013 by QEMU commit:
  commit 398489018183d613306ab022653552247d93919f

      pc: limit 64 bit hole to 2G by default

Released in 1.6.0

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/qemu/qemu_validate.c                    | 14 ----------
 tests/qemuxml2argvdata/pcihole64-none.err   |  1 -
 tests/qemuxml2argvdata/pcihole64-none.xml   | 25 -----------------
 tests/qemuxml2argvtest.c                    |  6 ++---
 tests/qemuxml2xmloutdata/pcihole64-none.xml | 30 ---------------------
 tests/qemuxml2xmltest.c                     |  8 +++---
 6 files changed, 5 insertions(+), 79 deletions(-)
 delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.err
 delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.xml
 delete mode 100644 tests/qemuxml2xmloutdata/pcihole64-none.xml

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 41765bba37..703d9776a9 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -3984,13 +3984,6 @@ qemuValidateDomainDeviceDefControllerPCI(const virDomainControllerDef *cont,
                                  "supported for machine '%s'"), def->os.machine);
                 return -1;
             }
-
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_I440FX_PCI_HOLE64_SIZE)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("64-bit PCI hole size setting is not supported "
-                                 "with this QEMU binary"));
-                return -1;
-            }
         }
         break;
 
@@ -4002,13 +3995,6 @@ qemuValidateDomainDeviceDefControllerPCI(const virDomainControllerDef *cont,
                                  "supported for machine '%s'"), def->os.machine);
                 return -1;
             }
-
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_Q35_PCI_HOLE64_SIZE)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("64-bit PCI hole size setting is not supported "
-                                 "with this QEMU binary"));
-                return -1;
-            }
         }
         break;
 
diff --git a/tests/qemuxml2argvdata/pcihole64-none.err b/tests/qemuxml2argvdata/pcihole64-none.err
deleted file mode 100644
index 049065a763..0000000000
--- a/tests/qemuxml2argvdata/pcihole64-none.err
+++ /dev/null
@@ -1 +0,0 @@
-unsupported configuration: 64-bit PCI hole size setting is not supported with this QEMU binary
diff --git a/tests/qemuxml2argvdata/pcihole64-none.xml b/tests/qemuxml2argvdata/pcihole64-none.xml
deleted file mode 100644
index e924747418..0000000000
--- a/tests/qemuxml2argvdata/pcihole64-none.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<domain type='qemu'>
-  <name>foo</name>
-  <uuid>c84fc647-6198-4ff9-bf81-d65a1f8f5ec0</uuid>
-  <memory unit='KiB'>2097152</memory>
-  <currentMemory unit='KiB'>2097152</currentMemory>
-  <vcpu placement='static' cpuset='0-1'>2</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='pci' index='0' model='pci-root'>
-      <pcihole64 unit='KiB'>0</pcihole64>
-    </controller>
-    <controller type='usb' index='0'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='virtio'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8933e373f7..639443b8a8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2796,13 +2796,11 @@ mymain(void)
     DO_TEST("hotplug-base",
             QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_SCSI);
 
-    DO_TEST("pcihole64", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);
-    DO_TEST_PARSE_ERROR_NOCAPS("pcihole64-none");
+    DO_TEST_NOCAPS("pcihole64");
     DO_TEST("pcihole64-q35",
             QEMU_CAPS_DEVICE_IOH3420,
             QEMU_CAPS_ICH9_AHCI,
-            QEMU_CAPS_DEVICE_QXL,
-            QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
+            QEMU_CAPS_DEVICE_QXL);
 
     DO_TEST_NOCAPS("arm-vexpressa9-nodevs");
     DO_TEST_NOCAPS("arm-vexpressa9-basic");
diff --git a/tests/qemuxml2xmloutdata/pcihole64-none.xml b/tests/qemuxml2xmloutdata/pcihole64-none.xml
deleted file mode 100644
index c4b12510bf..0000000000
--- a/tests/qemuxml2xmloutdata/pcihole64-none.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<domain type='qemu'>
-  <name>foo</name>
-  <uuid>c84fc647-6198-4ff9-bf81-d65a1f8f5ec0</uuid>
-  <memory unit='KiB'>2097152</memory>
-  <currentMemory unit='KiB'>2097152</currentMemory>
-  <vcpu placement='static' cpuset='0-1'>2</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='pci' index='0' model='pci-root'>
-      <pcihole64 unit='KiB'>0</pcihole64>
-    </controller>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <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='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index af0e2c930f..d9e393a2fb 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1027,14 +1027,12 @@ mymain(void)
     DO_TEST("s390-serial-2", QEMU_CAPS_CCW);
     DO_TEST("s390-serial-console", QEMU_CAPS_CCW);
 
-    DO_TEST("pcihole64", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);
-    DO_TEST("pcihole64-gib", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);
-    DO_TEST("pcihole64-none", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);
+    DO_TEST_NOCAPS("pcihole64");
+    DO_TEST_NOCAPS("pcihole64-gib");
     DO_TEST("pcihole64-q35",
             QEMU_CAPS_DEVICE_IOH3420,
             QEMU_CAPS_ICH9_AHCI,
-            QEMU_CAPS_DEVICE_QXL,
-            QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
+            QEMU_CAPS_DEVICE_QXL);
 
     DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC);
     DO_TEST("panic-double", QEMU_CAPS_DEVICE_PANIC);
-- 
2.37.1



More information about the libvir-list mailing list