From: Ani Sinha Date: Mon, 4 Oct 2021 17:26:13 +0000 (+0530) Subject: qemu: capabilities: remove -en from piix4-acpi-root-hotplug-en X-Git-Tag: v7.9.0-rc1~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=400979fd06c851b1a061f7d7075348772ff16a09;p=thirdparty%2Flibvirt.git qemu: capabilities: remove -en from piix4-acpi-root-hotplug-en The capability name piix4-acpi-root-hotplug-en is not conventional and appreared to be confusing to some. "en" suffix is also incorrect as the capability in qemu is used to both enable and disable hotplug on the pci root bus on the i440fx. Hence, rename it to piix4.acpi-root-pci-hotplug so that it is clearer, less confusing and more accurate. Signed-off-by: Ani Sinha Reviewed-by: Laine Stump --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6d1389af87..82687dbf39 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -643,7 +643,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 410 */ "virtio-mem-pci", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI */ "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_RESERVE */ - "piix4-acpi-root-hotplug-en", /* QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG */ + "piix4.acpi-root-pci-hotplug", /* QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG */ ); @@ -1471,7 +1471,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = { { "disable_s3", QEMU_CAPS_PIIX_DISABLE_S3, NULL }, { "disable_s4", QEMU_CAPS_PIIX_DISABLE_S4, NULL }, - { "acpi-root-pci-hotplug", QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, NULL }, + { "acpi-root-pci-hotplug", QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 867c94cb3d..2bbfc15dc4 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -623,7 +623,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 410 */ QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */ QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= */ - QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-hotplug */ + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-hotplug */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 717b97bf3a..c84508cb64 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3873,7 +3873,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDomainControllerDef *cont, if (pciopts->hotplug != VIR_TRISTATE_SWITCH_ABSENT) { switch ((virDomainControllerModelPCI) cont->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG)) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("setting the %s property on a '%s' device is not supported by this QEMU binary"), "hotplug", "pci-root"); diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 79d36bf19f..98b5f34f2b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -231,7 +231,7 @@ - + 5002000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 0d8edef6a1..f13a909314 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -239,7 +239,7 @@ - + 6000000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 7ba3b328ca..87b37a2b7c 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -242,7 +242,7 @@ - + 6001000 0 43100243 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e0ff216b3a..94aaa2f53e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2572,7 +2572,7 @@ mymain(void) QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4); DO_TEST("pc-i440fx-acpi-root-hotplug-disable", - QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG); + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); DO_TEST_PARSE_ERROR_NOCAPS("pc-i440fx-acpi-root-hotplug-disable"); DO_TEST("q35-usb2", QEMU_CAPS_DEVICE_PCI_BRIDGE, diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index fdbaede9a5..69363ef85c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -425,9 +425,9 @@ mymain(void) DO_TEST_NOCAPS("misc-acpi"); DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3); DO_TEST("pc-i440fx-acpi-root-hotplug-disable", - QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG); + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); DO_TEST("pc-i440fx-acpi-root-hotplug-enable", - QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG); + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); DO_TEST("misc-disable-suspends", QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4);