Revert "qemuValidateDomainDefPCIFeature: Fix validation logic"

This reverts commit bdc3e8f47b.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
This commit is contained in:
Laine Stump 2021-10-20 14:54:31 -04:00
parent 1a786fda0e
commit 4aa75c3e4b

View File

@ -179,6 +179,9 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def,
int feature)
{
size_t i;
bool q35Dom = qemuDomainIsQ35(def);
bool q35cap = q35Dom && virQEMUCapsGet(qemuCaps,
QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE);
if (def->features[feature] == VIR_TRISTATE_SWITCH_ABSENT)
return 0;
@ -195,9 +198,9 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def,
virArchToString(def->os.arch));
return -1;
}
if ((qemuDomainIsQ35(def) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE)) ||
(!qemuDomainIsQ35(def) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE))) {
if (!q35cap &&
!virQEMUCapsGet(qemuCaps,
QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("acpi-bridge-hotplug is not available with this QEMU binary"));
return -1;