diff options
author | Andrea Bolognani <abologna@redhat.com> | 2016-05-16 09:51:42 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2016-05-17 00:01:45 +0200 |
commit | 8531b85ba645b7f83321c2d340b16736b7d9f69a (patch) | |
tree | 30d248a0eb0b82e8451794c61acce9dd59072724 /src | |
parent | 1222a3032b85b5ed15c6b63c4dd99ce8c914fed0 (diff) | |
download | libvirt-8531b85ba645b7f83321c2d340b16736b7d9f69a.tar.gz |
qemu: Drop QEMU_CAPS_PCI_ROMBAR
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/qemu/qemu_capabilities.c | 14 | ||||
-rw-r--r-- | src/qemu/qemu_capabilities.h | 2 | ||||
-rw-r--r-- | src/qemu/qemu_command.c | 12 |
3 files changed, 4 insertions, 24 deletions
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 611fab00da..8098416be5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1303,19 +1303,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); @@ -1614,7 +1601,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 9145f2d2ba..2d8f82ddf7 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 f786462c6b..fc92b7d123 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -508,8 +508,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) { @@ -517,11 +516,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: @@ -3400,7 +3394,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); @@ -4469,7 +4463,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) |