提交 5b783379 编写于 作者: A Andrea Bolognani

qemu: Drop QEMU_CAPS_PCI_MULTIBUS

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.
上级 f9f29928
...@@ -2268,9 +2268,9 @@ virQEMUCapsGet(virQEMUCapsPtr qemuCaps, ...@@ -2268,9 +2268,9 @@ virQEMUCapsGet(virQEMUCapsPtr qemuCaps,
bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps, bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
virDomainDefPtr def) virDomainDefPtr def)
{ {
bool hasMultiBus = virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS); /* x86_64 and i686 support PCI-multibus on all machine types
* since forever */
if (hasMultiBus) if (ARCH_IS_X86(qemuCaps->arch))
return true; return true;
if (def->os.arch == VIR_ARCH_PPC || if (def->os.arch == VIR_ARCH_PPC ||
...@@ -3913,17 +3913,6 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c ...@@ -3913,17 +3913,6 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const c
qmperr) < 0) qmperr) < 0)
goto cleanup; 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 /* -no-acpi is not supported on non-x86
* even if qemu reports it in -help */ * even if qemu reports it in -help */
if (qemuCaps->arch != VIR_ARCH_X86_64 && if (qemuCaps->arch != VIR_ARCH_X86_64 &&
...@@ -4025,18 +4014,9 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps, ...@@ -4025,18 +4014,9 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
goto cleanup; goto cleanup;
} }
/* x86_64 and i686 support PCI-multibus on all machine types /* ACPI/HPET/KVM PIT are x86 specific */
* 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
*/
if (qemuCaps->arch == VIR_ARCH_X86_64 || if (qemuCaps->arch == VIR_ARCH_X86_64 ||
qemuCaps->arch == VIR_ARCH_I686) { qemuCaps->arch == VIR_ARCH_I686) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT);
......
...@@ -119,7 +119,7 @@ typedef enum { ...@@ -119,7 +119,7 @@ typedef enum {
/* 50 */ /* 50 */
QEMU_CAPS_HDA_DUPLEX, /* -device hda-duplex */ QEMU_CAPS_HDA_DUPLEX, /* -device hda-duplex */
QEMU_CAPS_DRIVE_AIO, /* -drive aio= supported */ 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_PCI_BOOTINDEX, /* pci-assign.bootindex */
QEMU_CAPS_CCID_EMULATED, /* -device ccid-card-emulated */ QEMU_CAPS_CCID_EMULATED, /* -device ccid-card-emulated */
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
<flag name='chardev-spicevmc'/> <flag name='chardev-spicevmc'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<flag name='boot-index'/> <flag name='boot-index'/>
<flag name='hda-duplex'/> <flag name='hda-duplex'/>
<flag name='drive-aio'/> <flag name='drive-aio'/>
<flag name='pci-multibus'/>
<flag name='pci-bootindex'/> <flag name='pci-bootindex'/>
<flag name='ccid-emulated'/> <flag name='ccid-emulated'/>
<flag name='ccid-passthru'/> <flag name='ccid-passthru'/>
......
...@@ -388,9 +388,6 @@ testUpdateQEMUCaps(const struct testInfo *info, ...@@ -388,9 +388,6 @@ testUpdateQEMUCaps(const struct testInfo *info,
virQEMUCapsFilterByMachineType(info->qemuCaps, vm->def->os.machine); virQEMUCapsFilterByMachineType(info->qemuCaps, vm->def->os.machine);
if (ARCH_IS_X86(vm->def->os.arch))
virQEMUCapsSet(info->qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
ret = 0; ret = 0;
cleanup: cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册