]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Drop QEMU_CAPS_PCI_MULTIBUS
authorAndrea Bolognani <abologna@redhat.com>
Thu, 2 Mar 2017 14:40:29 +0000 (15:40 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 3 Mar 2017 11:55:13 +0000 (12:55 +0100)
Due to the extra architecture-specific logic, it's already
necessary for users to call virQEMUCapsHasPCIMultiBus(),
so the capability itself is just a pointless distraction.

16 files changed:
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
tests/qemuxml2argvtest.c

index 6f60a00ef4b262b908c62421f9d929b330277c02..17964a1ad6c9ac570b7399cd88084709d315dbd6 100644 (file)
@@ -2268,9 +2268,9 @@ virQEMUCapsGet(virQEMUCapsPtr qemuCaps,
 bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
                                virDomainDefPtr def)
 {
-    bool hasMultiBus = virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
-
-    if (hasMultiBus)
+    /* x86_64 and i686 support PCI-multibus on all machine types
+     * since forever */
+    if (ARCH_IS_X86(qemuCaps->arch))
         return true;
 
     if (def->os.arch == VIR_ARCH_PPC ||
@@ -3913,17 +3913,6 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c
                                 qmperr) < 0)
         goto cleanup;
 
-    /* x86_64 and i686 support PCI-multibus on all machine types
-     * since forever. For other architectures, it has been changing
-     * across releases, per machine type, so we can't simply detect
-     * it here. Thus the rest of the logic is provided in a separate
-     * helper virQEMUCapsHasPCIMultiBus() which keys off the machine
-     * stored in virDomainDef and QEMU version number
-     */
-    if (qemuCaps->arch == VIR_ARCH_X86_64 ||
-        qemuCaps->arch == VIR_ARCH_I686)
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
-
     /* -no-acpi is not supported on non-x86
      * even if qemu reports it in -help */
     if (qemuCaps->arch != VIR_ARCH_X86_64 &&
@@ -4025,18 +4014,9 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
         goto cleanup;
     }
 
-    /* x86_64 and i686 support PCI-multibus on all machine types
-     * since forever. For other architectures, it has been changing
-     * across releases, per machine type, so we can't simply detect
-     * it here. Thus the rest of the logic is provided in a separate
-     * helper virQEMUCapsHasPCIMultiBus() which keys off the machine
-     * stored in virDomainDef and QEMU version number
-     *
-     * ACPI/HPET/KVM PIT are also x86 specific
-     */
+    /* ACPI/HPET/KVM PIT are x86 specific */
     if (qemuCaps->arch == VIR_ARCH_X86_64 ||
         qemuCaps->arch == VIR_ARCH_I686) {
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET);
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT);
index 0f998c473ffa0db9d08bb3e89b245d20ebd789e4..f469736bcdc735c5a978c20bdbec5cab2903eeb7 100644 (file)
@@ -119,7 +119,7 @@ typedef enum {
     /* 50 */
     QEMU_CAPS_HDA_DUPLEX, /* -device hda-duplex */
     QEMU_CAPS_DRIVE_AIO, /* -drive aio= supported */
-    QEMU_CAPS_PCI_MULTIBUS, /* bus=pci.0 vs bus=pci */
+    X_QEMU_CAPS_PCI_MULTIBUS, /* bus=pci.0 vs bus=pci */
     QEMU_CAPS_PCI_BOOTINDEX, /* pci-assign.bootindex */
     QEMU_CAPS_CCID_EMULATED, /* -device ccid-card-emulated */
 
index 6ea39c60279016430e6b8ba8308a71d0a5a62179..f258c5fd3ccd7fd980fea0d2655e5d6843f5af9f 100644 (file)
@@ -24,7 +24,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
   <flag name='chardev-spicevmc'/>
index aeb5cef36aa1d68062933e715274716a1807eb51..bc76818d4f1472f079a273bd68282598642b991f 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index 5b41244298ed283b4b4e959f6bb237c1109105dc..ef4840003ce1337b6d305b35359153539a25a6b9 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index d7c0b175de270506e7c623056f872997adc02d39..96b6fdb45b043ca2077ac739cf6a3b61ac68134c 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index 25b9f56528a2ef36ec1605a8403e3b68629747f4..5181d853ec2ada359d6258ad80d092d99e114d1b 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index 1323a0cf732ed3ac2177b7cdf284860beb96d2c4..3fbc2567625e23cf1325e92898bc5f18b5a994ac 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index f47aa84df6d52f8c38e9c061c70efabf97315c2b..f3635d9a0508505d5c5182d485be44f7bbdeab40 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index 9248a06346a31caf2f35b981aaa67fffa15d9104..b1b9e1571d20faacb81deeb3ae9b7467fee778a4 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index 96e62d3e59a2ceb320b4ab297ba14f2406c29907..2e23a93d6a6c4223aee56875c7087a23504d90c4 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index faddd5065aeec9fef98ad63a58c469b7efc756a7..1286f84df5e36354511104eec70adf292ca615dd 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index c789f0eaa76cf3a5d533fd56fdbe7b2cd660ddd9..0c0b423f3f647fda7f137854905e374c92b2e62d 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index caa14c41eab7ab892a3a8c9e9cd4e3603a48244c..d650f094ab8f90f2d9e8e24aefc3952ffc9f4a84 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index dcdc0e621321dedf5473c19069a09b33a67d825c..1025365024e241b43216931efeeb24c128e2bd00 100644 (file)
@@ -25,7 +25,6 @@
   <flag name='boot-index'/>
   <flag name='hda-duplex'/>
   <flag name='drive-aio'/>
-  <flag name='pci-multibus'/>
   <flag name='pci-bootindex'/>
   <flag name='ccid-emulated'/>
   <flag name='ccid-passthru'/>
index ad9ce8e2d5f89d77ef79ea3e73bd8d28d06599c2..3284f40922779418440e0d56e2b3d63463c852aa 100644 (file)
@@ -388,9 +388,6 @@ testUpdateQEMUCaps(const struct testInfo *info,
 
     virQEMUCapsFilterByMachineType(info->qemuCaps, vm->def->os.machine);
 
-    if (ARCH_IS_X86(vm->def->os.arch))
-        virQEMUCapsSet(info->qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
-
     ret = 0;
 
  cleanup: