The only QEMU versions that don't have such capability are <0.12,
which we no longer support anyway.
Additionally, this solves the issue of some QEMU binaries being
reported as not having such capability just because they lacked
the {kvm-}pci-assign QMP object.
---
src/qemu/qemu_capabilities.c | 14 --------------
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 12 +++---------
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 -
tests/qemuhelptest.c | 8 --------
tests/qemuxml2argvtest.c | 3 +--
14 files changed, 5 insertions(+), 43 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fcfd1cd..d3fa9c7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1302,19 +1302,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
if (version >= 13000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIFUNCTION);
- /* Although very new versions of qemu advertise the presence of
- * the rombar option in the output of "qemu -device pci-assign,?",
- * this advertisement was added to the code long after the option
- * itself. According to qemu developers, though, rombar is
- * available in all qemu binaries from release 0.12 onward.
- * Setting the capability this way makes it available in more
- * cases where it might be needed, and shouldn't cause any false
- * positives (in the case that it did, qemu would produce an error
- * log and refuse to start, so it would be immediately obvious).
- */
- if (version >= 12000)
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_ROMBAR);
-
if (version >= 11000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST);
@@ -1613,7 +1600,6 @@ static struct virQEMUCapsStringFlags
virQEMUCapsObjectPropsVirtioSCSI[] = {
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPCIAssign[] = {
- { "rombar", QEMU_CAPS_PCI_ROMBAR },
{ "configfd", QEMU_CAPS_PCI_CONFIGFD },
{ "bootindex", QEMU_CAPS_PCI_BOOTINDEX },
};
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index e7d0a60..604154d 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -152,7 +152,7 @@ typedef enum {
/* 75 */
QEMU_CAPS_DRIVE_CACHE_UNSAFE, /* Is cache=unsafe supported? */
- QEMU_CAPS_PCI_ROMBAR, /* -device rombar=0|1 */
+ X_QEMU_CAPS_PCI_ROMBAR, /* -device rombar=0|1 */
QEMU_CAPS_ICH9_AHCI, /* -device ich9-ahci */
QEMU_CAPS_NO_ACPI, /* -no-acpi */
QEMU_CAPS_FSDEV_READONLY, /* -fsdev readonly supported */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0d6d5f8..e48e722 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -493,8 +493,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
static int
qemuBuildRomStr(virBufferPtr buf,
- virDomainDeviceInfoPtr info,
- virQEMUCapsPtr qemuCaps)
+ virDomainDeviceInfoPtr info)
{
if (info->rombar || info->romfile) {
if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
@@ -502,11 +501,6 @@ qemuBuildRomStr(virBufferPtr buf,
"%s", _("rombar and romfile are supported only
for PCI devices"));
return -1;
}
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_ROMBAR)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- "%s", _("rombar and romfile not supported in
this QEMU binary"));
- return -1;
- }
switch (info->rombar) {
case VIR_TRISTATE_SWITCH_OFF:
@@ -3373,7 +3367,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
virMacAddrFormat(&net->mac, macaddr));
if (qemuBuildDeviceAddressStr(&buf, def, &net->info, qemuCaps) < 0)
goto error;
- if (qemuBuildRomStr(&buf, &net->info, qemuCaps) < 0)
+ if (qemuBuildRomStr(&buf, &net->info) < 0)
goto error;
if (bootindex && virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX))
virBufferAsprintf(&buf, ",bootindex=%u", bootindex);
@@ -4442,7 +4436,7 @@ qemuBuildPCIHostdevDevStr(const virDomainDef *def,
virBufferAsprintf(&buf, ",bootindex=%u", bootIndex);
if (qemuBuildDeviceAddressStr(&buf, def, dev->info, qemuCaps) < 0)
goto error;
- if (qemuBuildRomStr(&buf, dev->info, qemuCaps) < 0)
+ if (qemuBuildRomStr(&buf, dev->info) < 0)
goto error;
if (virBufferCheckError(&buf) < 0)
diff --git a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
index 6f6a5b9..39d4cc3 100644
--- a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
index 18550e2..cbb6d88 100644
--- a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 72f09f7..cb3aa68 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -50,7 +50,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index c612c11..bdd7f5f 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
index f4603c1..122082d 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index 4663e19..79a93bf 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -52,7 +52,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index a8df7e1..b72d87f 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 2160173..3a35733 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 9024d63..d51d3f4 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -51,7 +51,6 @@
<flag name='usb-hub'/>
<flag name='no-shutdown'/>
<flag name='cache-unsafe'/>
- <flag name='rombar'/>
<flag name='ich9-ahci'/>
<flag name='no-acpi'/>
<flag name='fsdev-readonly'/>
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index 26455d5..c0bc98e 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -167,7 +167,6 @@ mymain(void)
QEMU_CAPS_VGA_NONE,
QEMU_CAPS_DRIVE_AIO,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
QEMU_CAPS_CPU_HOST,
@@ -204,7 +203,6 @@ mymain(void)
QEMU_CAPS_PIIX4_USB_UHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
QEMU_CAPS_CPU_HOST,
@@ -243,7 +241,6 @@ mymain(void)
QEMU_CAPS_VGA_NONE,
QEMU_CAPS_DRIVE_AIO,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
QEMU_CAPS_CPU_HOST,
@@ -286,7 +283,6 @@ mymain(void)
QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
QEMU_CAPS_CPU_HOST,
@@ -344,7 +340,6 @@ mymain(void)
QEMU_CAPS_PIIX4_USB_UHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SCSI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
@@ -407,7 +402,6 @@ mymain(void)
QEMU_CAPS_ICH9_USB_EHCI1,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_VIRTIO_BLK_SCSI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
@@ -470,7 +464,6 @@ mymain(void)
QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_FSDEV_READONLY,
@@ -548,7 +541,6 @@ mymain(void)
QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
- QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_FSDEV_READONLY,
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index d1cfbec..62466fd 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1233,8 +1233,7 @@ mymain(void)
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("pci-rom",
- QEMU_CAPS_PCIDEVICE, QEMU_CAPS_NODEFCONFIG,
- QEMU_CAPS_PCI_ROMBAR);
+ QEMU_CAPS_PCIDEVICE, QEMU_CAPS_NODEFCONFIG);
DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, NONE);
DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, NONE);
--
2.5.5