[libvirt PATCH 00/10] Revert <acpi-hotplug-bridge>

Starting with commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5, support for overriding the default hotplug method for a guest using the <acpi-bridge-hotplug> subelement of <features>/<pci> was added to libvirt. This uses the QEMU global commandline switch: ICH9-LPC.acpi-pci-hotplug-with-bridge-support=<off|on> that was added to QEMU in qemu-6.1 (along with QEMU switching the default hotplug type for new Q35-based machinetypes from "native PCIe" to "ACPI"). Unfortunately, soon after we pushed the <acpi-bridge-hotplug> patches to libvirt (2 days after, to be exact), during a regular weekly meeting I attend with some of the QEMU developers, along with bugs that had been found in ACPI hotplug since it was made the default, they were also discussing issues they'd found with the implementation of the QEMU commandline switch to change back to native PCIe hotplug. Apparently the current method used by acpi-pci-hotplug-with-bridge-support is causing "confusion" in guests, so they were talking about the possibility of changing what the switch does (or replacing it), and suggested that libvirt should "hold off" on supporting it for now. (oops) (they didn't know that we had just pushed Ani's patches that used it) Since the current QEMU option is doomed to either changed behavior (which would result in a guest-visible ABI change) or full deprecation and replacement, it would be better for libvirt to not use it at all, and re-implement based on whatever replacement QEMU comes up with. Once a new XML element has appeared in a libvirt upstream release, we are committed to keeping it there "forever". However, since there has not yet been an upstream release since <acpi-bridge-hotplug> was added, there is still time to revert and avoid the endless support/maintenance burden. Not much time though! And that is the purpose of this patch series. They revert, in reverse order, Ani's 4 original patches adding the feature, along with Peter's 6 followup patches that correct a logic error and streamline/beef up the unit tests. (Note that it is still possible that QEMU would figure out a way out of this without modifying their current flag in any significant way, and in that case we could always "re-apply" the original patches. However, if we don't revert before the next release (Andrea has pointed out the freeze for RC1 is next Tuesday, and it would be best to have it done before then), we will no longer have the option to remove it.) There was some conflict resolution necessary after the "git revert" commands, due to other unrelated patches that changed test case data, and due to a couple of Peter's patches also touching up the i440fx pci-root-hotplug disabling test cases (which are *not* being reverted - they work as advertised!). Note that this series involves *re-adding* some things, just to remove them again in a later revert - this is because Peter's patches effectively reverted the addition of a QEMU capability flag that had been added in Ani's original patches. If anyone would prefer, I can squash those patches together so that the extra dance is eliminated from the diffs; it just seemed more mechanical to do it this way though. A more detailed explanation of the issue: Current Behavior of existing QEMU option ======================================== As far as I understand (and keep in mind that I have misunderstood and misinterpreted this *at least* 4 separate times since it was first explained to me!), the effect of this QEMU setting: -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on is to: 1) enable ACPI hotplug (i.e. expose it to the guest) 2) disable native PCIe hotplug (don't expose it to the guest) By having only one of the two types of hotplug enabled, the intent is to force the guest to use the still-enabled type of hotplug. Unfortunately, after QEMU 6.1 was released with acpi-pci-hotplug=on as the default for new machinetypes, problems were encountered with ACPI hotplug, which caused more attention to be called to the QEMU switch, and the people looking into that found that enabling ACPI and disabling native PCIe hotplug doesn't necessarily have the desired effect of causing the guest to use ACPI for hotplug (or maybe it was the opposite direction). Instead, it "gets confused" (a very technical term, I know. You can ask Julia or Michael for a definition :-)). One possible fix that they talked about was changing the behavior of ICH9-LPC.acpi-pci-hotplug-with-bridge-support: Potential Change to Behavior of QEMU option =========================================== I know it's more complex than this (again, Julia or Michael can explain), but my basic understanding of the way that they're currently thinking of modifying the acpi-pci-hotplug-with-bridge-support option is to have everything the same, *except* that when acpi-hotplug=off, ACPI hotplug will *still be enabled* along with native PCIe hotplug; but because guest OSes prefer native hotplug over ACPI, native PCIe hotplug will be chosen in that case. (Presumably this change prevents the "confusion" that is seen with the existing behavior of the option). So essentially, the choice of whether to use ACPI is controlled by enabling/disabling native PCIe hotplug (which *kind of* goes against the libvirt philosophy of "the XML describes the virtual machine that is presented to the guest"; instead it becomes "the XML describes how the guest will behave"). Another possibility would be to completely scrap (well, deprecate and later remove) the current QEMU commandline switch in favor of one or more switches that behave differently but result in the desired behavior. In either case, I think the best course of action for libvirt is to revert the current <acpi-bridge-hotplug>, wait until QEMU settles down with a new workable set of switches, and then re-do libvirt support based on that. Laine Stump (10): Revert "qemu: capabilities: Remove QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE" Revert "qemuxml2xmltest: Convert all acpi-hotplug control related tests to DO_TEST_CAPS_LATEST" Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug related cases" Revert "qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable'" Revert "qemuValidateDomainDefPCIFeature: Fix validation logic" Revert "qemuValidateDomainDefPCIFeature: un-break error messages" Revert "NEWS: document new acpi pci hotplug config option" Revert "qemu: command: add support for acpi-bridge-hotplug feature" Revert "conf: introduce support for acpi-bridge-hotplug feature" Revert "qemu: capablities: detect acpi-pci-hotplug-with-bridge-support" NEWS.rst | 8 -- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ---- src/conf/domain_conf.c | 89 +------------------ src/conf/domain_conf.h | 9 -- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_command.c | 19 ---- src/qemu/qemu_validate.c | 41 --------- .../caps_6.1.0.x86_64.xml | 1 - .../caps_6.2.0.x86_64.xml | 1 - ...-hotplug-bridge-disable.aarch64-latest.err | 1 - .../aarch64-acpi-hotplug-bridge-disable.xml | 13 --- ...-hotplug-bridge-disable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 33 ------- ...i-hotplug-bridge-enable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 33 ------- ...pi-hotplug-bridge-disable.x86_64-6.0.0.err | 1 - ...-hotplug-bridge-disable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-disable.xml | 47 ---------- ...cpi-hotplug-bridge-enable.x86_64-6.0.0.err | 1 - ...i-hotplug-bridge-enable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-enable.xml | 47 ---------- tests/qemuxml2argvtest.c | 10 --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 -------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 -------- ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ----------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ----------- tests/qemuxml2xmltest.c | 10 +-- 33 files changed, 9 insertions(+), 794 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml -- 2.31.1

This reverts commit 618e8665db2e4c1a8e9a227045b99b48f6110c06. This is the first in a series of 10 commits that revert (in reverse order) the changes to add the <acpi-hotplug-bridge state='on|off'/> switch to libvirt domain XML, which unfortunately needs to be removed due to QEMU developers discovering a flaw with the design of the QEMU commandline switch used to implement the libvirt switch that will likely result in a new and different method of selecting hotplug modes. Because the libvirt switch has not been in any official releases of libvirt, we are still able to remove it completely, rather than deprecating it. The original commits began with commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5. The other original commit IDs are documented in each revert commit. Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_capabilities.h | 3 ++- src/qemu/qemu_command.c | 3 ++- src/qemu/qemu_validate.c | 4 ++-- tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + 17 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index cddd39924d..c5ebf5d156 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -644,10 +644,11 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-mem-pci", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI */ "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_RESERVE */ "piix4.acpi-root-pci-hotplug", /* QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG */ + "piix4.acpi-hotplug-bridge", /* QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE */ "ich9.acpi-hotplug-bridge", /* QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE */ - "netdev.json", /* QEMU_CAPS_NETDEV_JSON */ /* 415 */ + "netdev.json", /* QEMU_CAPS_NETDEV_JSON */ "chardev.json", /* QEMU_CAPS_CHARDEV_JSON */ "device.json", /* QEMU_CAPS_DEVICE_JSON */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ @@ -1469,6 +1470,7 @@ 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_PIIX4_ACPI_ROOT_PCI_HOTPLUG, NULL }, + { "acpi-pci-hotplug-with-bridge-support", QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index bb53d9ae46..ac8a94a0af 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -624,10 +624,11 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */ QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= */ QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-hotplug */ + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE, /* -M pc PIIX4_PM.acpi-pci-hotplug-with-bridge-support */ QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, /* -M q35 ICH9-LPC.acpi-pci-hotplug-with-bridge-support */ - QEMU_CAPS_NETDEV_JSON, /* -netdev accepts JSON */ /* 415 */ + QEMU_CAPS_NETDEV_JSON, /* -netdev accepts JSON */ QEMU_CAPS_CHARDEV_JSON, /* -chardev accepts JSON */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d6df50ec73..989ddcadb8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6464,7 +6464,8 @@ qemuBuildPMCommandLine(virCommand *cmd, if (acpihp_br != VIR_TRISTATE_SWITCH_ABSENT) { const char *pm_object = NULL; - if (!qemuDomainIsQ35(def)) + if (!qemuDomainIsQ35(def) && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE)) pm_object = "PIIX4_PM"; if (qemuDomainIsQ35(def) && diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3045e4b64b..1ffc261c58 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -196,8 +196,8 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def, return -1; } - if (qemuDomainIsQ35(def) && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE)) { + if ((qemuDomainIsQ35(def) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE)) || + (!qemuDomainIsQ35(def) && !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; diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml index 559bf16766..6544b78730 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -167,6 +167,7 @@ <flag name='am53c974'/> <flag name='cpu-max'/> <flag name='input-linux'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>2011000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100288</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index 745110142f..c66a140f8d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -179,6 +179,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>2011090</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 5acce281b1..33daa45713 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -185,6 +185,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100239</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml index 92b3b10147..fcfa890be9 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -189,6 +189,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>3000092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index 28643ca67d..c87e3d46c0 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -197,6 +197,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml index 7a38f44dea..c143b16f52 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -204,6 +204,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>4001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index d3dde76939..16be4bff7c 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -215,6 +215,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>4002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 3e99e52962..c571cd405d 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -222,6 +222,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index 18b7897bfa..e17da3df1f 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -225,6 +225,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> + <flag name='piix4.acpi-hotplug-bridge'/> <version>5001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 923aa240ad..4c6cc00545 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -227,6 +227,7 @@ <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> + <flag name='piix4.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>5002000</version> <kvmVersion>0</kvmVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 78ede15fb3..0f25593887 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -235,6 +235,7 @@ <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> + <flag name='piix4.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>6000000</version> <kvmVersion>0</kvmVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 98c2fcedce..4e12d696c7 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -238,6 +238,7 @@ <flag name='virtio-mem-pci'/> <flag name='memory-backend-file.reserve'/> <flag name='piix4.acpi-root-pci-hotplug'/> + <flag name='piix4.acpi-hotplug-bridge'/> <flag name='ich9.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>6001000</version> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 5a46da0a6a..8e87daf536 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -238,6 +238,7 @@ <flag name='virtio-mem-pci'/> <flag name='memory-backend-file.reserve'/> <flag name='piix4.acpi-root-pci-hotplug'/> + <flag name='piix4.acpi-hotplug-bridge'/> <flag name='ich9.acpi-hotplug-bridge'/> <flag name='device.json'/> <flag name='query-dirty-rate'/> -- 2.31.1

This reverts commit da896d440c7267e0b4575e4a3f2780bebf3fbfca. Signed-off-by: Laine Stump <laine@redhat.com> --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 1 + ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-enable.xml | 1 + tests/qemuxml2xmltest.c | 24 ++++++--- 13 files changed, 24 insertions(+), 250 deletions(-) delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml deleted file mode 100644 index 1b63ff9539..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml +++ /dev/null @@ -1,36 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='off'/> - </pci> - </features> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml new file mode 120000 index 0000000000..8154897401 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml deleted file mode 100644 index f7b2cbb9ce..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml +++ /dev/null @@ -1,36 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='on'/> - </pci> - </features> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml new file mode 120000 index 0000000000..6b9e5492f8 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml deleted file mode 100644 index 5a78fe638d..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml +++ /dev/null @@ -1,33 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='pci' index='0' model='pci-root'> - <target hotplug='off'/> - </controller> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml new file mode 120000 index 0000000000..0570e40273 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml deleted file mode 100644 index 002bfea99d..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml +++ /dev/null @@ -1,33 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='pci' index='0' model='pci-root'> - <target hotplug='on'/> - </controller> - <controller type='usb' index='0' model='piix3-uhci'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml new file mode 120000 index 0000000000..2b0e42925f --- /dev/null +++ b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml deleted file mode 100644 index 87e61763fe..0000000000 --- a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml +++ /dev/null @@ -1,53 +0,0 @@ -<domain type='qemu'> - <name>q35</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='off'/> - </pci> - </features> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x8'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <controller type='usb' index='0' model='qemu-xhci'> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml new file mode 120000 index 0000000000..77719b1325 --- /dev/null +++ b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml deleted file mode 100644 index 9a8043849c..0000000000 --- a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml +++ /dev/null @@ -1,53 +0,0 @@ -<domain type='qemu'> - <name>q35</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='on'/> - </pci> - </features> - <cpu mode='custom' match='exact' check='none'> - <model fallback='forbid'>qemu64</model> - </cpu> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x8'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <controller type='usb' index='0' model='qemu-xhci'> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml new file mode 120000 index 0000000000..3cd8ee569e --- /dev/null +++ b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b0a1212a54..d6effbdac6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -424,12 +424,24 @@ mymain(void) DO_TEST_NOCAPS("input-usbtablet"); DO_TEST_NOCAPS("misc-acpi"); DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-enable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-enable"); + DO_TEST("pc-i440fx-acpi-root-hotplug-disable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST("pc-i440fx-acpi-root-hotplug-enable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-enable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST("q35-acpi-hotplug-bridge-disable", + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); + DO_TEST("q35-acpi-hotplug-bridge-enable", + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); DO_TEST("misc-disable-suspends", QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4); -- 2.31.1

On a Thursday in 2021, Laine Stump wrote:
This reverts commit da896d440c7267e0b4575e4a3f2780bebf3fbfca.
Signed-off-by: Laine Stump <laine@redhat.com> --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 1 + ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-enable.xml | 1 + tests/qemuxml2xmltest.c | 24 ++++++--- 13 files changed, 24 insertions(+), 250 deletions(-) delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b0a1212a54..d6effbdac6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -424,12 +424,24 @@ mymain(void) DO_TEST_NOCAPS("input-usbtablet"); DO_TEST_NOCAPS("misc-acpi"); DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-enable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-enable"); + DO_TEST("pc-i440fx-acpi-root-hotplug-disable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST("pc-i440fx-acpi-root-hotplug-enable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG);
Please only do a partial revert here and leave the i440fx root hotplug tests using the _LATEST form, since you're only reverting bridge hotplug tests by the end of the series. (The only conflict will be in context in the second-to-last patch. Well, and the NEWS addition, because I pushed a patch there in the meantime) Jano
+ DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-enable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE);

On 10/21/21 1:06 PM, Ján Tomko wrote:
On a Thursday in 2021, Laine Stump wrote:
This reverts commit da896d440c7267e0b4575e4a3f2780bebf3fbfca.
Signed-off-by: Laine Stump <laine@redhat.com> --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 1 + ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-enable.xml | 1 + tests/qemuxml2xmltest.c | 24 ++++++--- 13 files changed, 24 insertions(+), 250 deletions(-) delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b0a1212a54..d6effbdac6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -424,12 +424,24 @@ mymain(void) DO_TEST_NOCAPS("input-usbtablet"); DO_TEST_NOCAPS("misc-acpi"); DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-enable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-enable"); + DO_TEST("pc-i440fx-acpi-root-hotplug-disable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST("pc-i440fx-acpi-root-hotplug-enable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG);
Please only do a partial revert here and leave the i440fx root hotplug tests using the _LATEST form, since you're only reverting bridge hotplug tests by the end of the series.
Huh, I thought I caught all of those (maybe I "re-un-re-reverted" it in another patch?). Thanks for catching it! I fixed it, but I'm waiting until Monday to push these.
(The only conflict will be in context in the second-to-last patch. Well, and the NEWS addition, because I pushed a patch there in the meantime)
Jano
+ DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-enable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE);

On Sat, 23 Oct 2021, Laine Stump wrote:
On 10/21/21 1:06 PM, Ján Tomko wrote:
On a Thursday in 2021, Laine Stump wrote:
This reverts commit da896d440c7267e0b4575e4a3f2780bebf3fbfca.
Signed-off-by: Laine Stump <laine@redhat.com> --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 ------------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 1 + ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------------ .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-disable.xml | 1 + ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ------------------- .../q35-acpi-hotplug-bridge-enable.xml | 1 + tests/qemuxml2xmltest.c | 24 ++++++--- 13 files changed, 24 insertions(+), 250 deletions(-) delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b0a1212a54..d6effbdac6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -424,12 +424,24 @@ mymain(void) DO_TEST_NOCAPS("input-usbtablet"); DO_TEST_NOCAPS("misc-acpi"); DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-enable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-enable"); + DO_TEST("pc-i440fx-acpi-root-hotplug-disable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST("pc-i440fx-acpi-root-hotplug-enable", + QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG);
Please only do a partial revert here and leave the i440fx root hotplug tests using the _LATEST form, since you're only reverting bridge hotplug tests by the end of the series.
Huh, I thought I caught all of those (maybe I "re-un-re-reverted" it in another patch?). Thanks for catching it!
I fixed it, but I'm waiting until Monday to push these.
Please also review and push two simple patches related to pci-root hotplug that I sent. Hopefully they can make it in before the release. After you revert, I will also need to make another pass through my changes in case something was missed.
(The only conflict will be in context in the second-to-last patch. Well, and the NEWS addition, because I pushed a patch there in the meantime)
Jano
+ DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-enable", + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE);

This reverts commit 64146031058906804b3c5f519570fadc9ff4df48. Conflicts: tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.args tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args These files are unrelated to the functionality we need to remove, so they weren't removed, and the associated test cases weren't removed from qemuxml2argvtest.c Signed-off-by: Laine Stump <laine@redhat.com> --- ...i-hotplug-bridge-enable.x86_64-latest.args | 34 ----------------- ...cpi-hotplug-bridge-enable.x86_64-6.0.0.err | 1 - ...i-hotplug-bridge-enable.x86_64-latest.args | 37 ------------------- tests/qemuxml2argvtest.c | 3 -- 4 files changed, 75 deletions(-) delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args deleted file mode 100644 index 77ef82f25b..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-i440fx \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-i440fx/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-i440fx/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-i440fx/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=i440fx,debug-threads=on \ --S \ --object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-i440fx/master-key.aes"}' \ --machine pc-i440fx-2.5,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu qemu64 \ --m 1024 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=on \ --boot strict=on \ --device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ --audiodev id=audio1,driver=none \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err deleted file mode 100644 index 8c09a3cd76..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available with this QEMU binary diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args deleted file mode 100644 index 4ff07ad3b8..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args +++ /dev/null @@ -1,37 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-q35 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-q35/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-q35/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=q35,debug-threads=on \ --S \ --object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-q35/master-key.aes"}' \ --machine pc-q35-2.5,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu qemu64 \ --m 1024 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on \ --boot strict=on \ --device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1e"}' \ --device '{"driver":"pci-bridge","chassis_nr":2,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \ --device '{"driver":"ioh3420","port":8,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1"}' \ --device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \ --audiodev id=audio1,driver=none \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x1"}' \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e209b48fce..7c8b55f72c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2571,11 +2571,8 @@ mymain(void) DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-disable", "5.1.0"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-enable", "5.1.0"); DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-enable"); DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-enable"); DO_TEST_CAPS_VER_PARSE_ERROR("q35-acpi-hotplug-bridge-disable", "6.0.0"); - DO_TEST_CAPS_VER_PARSE_ERROR("q35-acpi-hotplug-bridge-enable", "6.0.0"); /* verify that we fail when acpi-bridge-hotplug option is specified for * archs other than x86 */ -- 2.31.1

This reverts commit 2d20f0bb05175d18513220bccd1dbaa207cc4c6a. Conflicts: tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args the test output of these files was regenerated because the tests were changed upstream to use JSON on the commandline at a later commit than the commit being reverted here (where they were changed to use latest caps, but the patches to use JSON on the commandline hadn't been committed yet). Signed-off-by: Laine Stump <laine@redhat.com> --- ...> aarch64-acpi-hotplug-bridge-disable.err} | 0 .../aarch64-acpi-hotplug-bridge-disable.xml | 22 ++++++++++- ...pc-i440fx-acpi-hotplug-bridge-disable.args | 31 ++++++++++++++++ ...pc-i440fx-acpi-hotplug-bridge-disable.err} | 0 ...-hotplug-bridge-disable.x86_64-latest.args | 34 ----------------- .../q35-acpi-hotplug-bridge-disable.args | 33 +++++++++++++++++ .../q35-acpi-hotplug-bridge-disable.err | 1 + ...-hotplug-bridge-disable.x86_64-latest.args | 37 ------------------- tests/qemuxml2argvtest.c | 17 +++++++-- 9 files changed, 99 insertions(+), 76 deletions(-) rename tests/qemuxml2argvdata/{aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err => aarch64-acpi-hotplug-bridge-disable.err} (100%) create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args rename tests/qemuxml2argvdata/{q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err => pc-i440fx-acpi-hotplug-bridge-disable.err} (100%) delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err similarity index 100% rename from tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err rename to tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml index 47107e93f3..0d5f945bd7 100644 --- a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml +++ b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml @@ -1,13 +1,33 @@ <domain type='qemu'> - <name>test</name> + <name>i440fx</name> + <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='aarch64' machine='virt'>hvm</type> + <boot dev='network'/> </os> <features> <pci> <acpi-bridge-hotplug state='off'/> </pci> </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </memballoon> + </devices> </domain> diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args new file mode 100644 index 0000000000..a1e5dc85c7 --- /dev/null +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-i440fx \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-i440fx/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-i440fx/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-i440fx/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest=i440fx,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-i440fx/master-key.aes \ +-machine pc-i440fx-2.5,accel=tcg,usb=off,dump-guest-core=off \ +-m 1024 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-i440fx/monitor.sock,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off \ +-boot strict=on \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err similarity index 100% rename from tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err rename to tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args deleted file mode 100644 index 8a3e91c95e..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-i440fx \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-i440fx/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-i440fx/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-i440fx/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=i440fx,debug-threads=on \ --S \ --object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-i440fx/master-key.aes"}' \ --machine pc-i440fx-2.5,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu qemu64 \ --m 1024 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off \ --boot strict=on \ --device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ --audiodev id=audio1,driver=none \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args new file mode 100644 index 0000000000..ef15930e3b --- /dev/null +++ b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args @@ -0,0 +1,33 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-q35 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-q35/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-q35/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest=q35,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-q35/master-key.aes \ +-machine pc-q35-2.5,accel=tcg,usb=off,dump-guest-core=off \ +-m 1024 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-q35/monitor.sock,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off \ +-boot strict=on \ +-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ +-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ +-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err new file mode 100644 index 0000000000..8c09a3cd76 --- /dev/null +++ b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err @@ -0,0 +1 @@ +unsupported configuration: acpi-bridge-hotplug is not available with this QEMU binary diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args deleted file mode 100644 index 5558f371ea..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args +++ /dev/null @@ -1,37 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-q35 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-q35/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-q35/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=q35,debug-threads=on \ --S \ --object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-q35/master-key.aes"}' \ --machine pc-q35-2.5,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu qemu64 \ --m 1024 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off \ --boot strict=on \ --device '{"driver":"i82801b11-bridge","id":"pci.1","bus":"pcie.0","addr":"0x1e"}' \ --device '{"driver":"pci-bridge","chassis_nr":2,"id":"pci.2","bus":"pci.1","addr":"0x0"}' \ --device '{"driver":"ioh3420","port":8,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1"}' \ --device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \ --audiodev id=audio1,driver=none \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x1"}' \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7c8b55f72c..c7b69c5674 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2570,13 +2570,22 @@ mymain(void) DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-disable", "5.1.0"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-enable", "5.1.0"); - DO_TEST_CAPS_LATEST("q35-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_LATEST("pc-i440fx-acpi-hotplug-bridge-disable"); - DO_TEST_CAPS_VER_PARSE_ERROR("q35-acpi-hotplug-bridge-disable", "6.0.0"); + DO_TEST("q35-acpi-hotplug-bridge-disable", + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_ICH9_AHCI, + QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); + DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); + DO_TEST_PARSE_ERROR_NOCAPS("q35-acpi-hotplug-bridge-disable"); + DO_TEST_PARSE_ERROR_NOCAPS("pc-i440fx-acpi-hotplug-bridge-disable"); /* verify that we fail when acpi-bridge-hotplug option is specified for * archs other than x86 */ - DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-acpi-hotplug-bridge-disable", "aarch64"); + DO_TEST_PARSE_ERROR_NOCAPS("aarch64-acpi-hotplug-bridge-disable"); DO_TEST("q35-usb2", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, -- 2.31.1

This reverts commit bdc3e8f47be108fa552b72a6d913528869e61097. Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_validate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 1ffc261c58..d3b9691db5 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -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; -- 2.31.1

This reverts commit 7d074c56830c5d435f87667299cc102650dbbb4f. Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_validate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index d3b9691db5..0cb4542efd 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -194,7 +194,8 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def, case VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG: if (!ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("acpi-bridge-hotplug is not available for architecture '%s'"), + _("acpi-bridge-hotplug is not available " + "for architecture '%s'"), virArchToString(def->os.arch)); return -1; } @@ -202,7 +203,8 @@ qemuValidateDomainDefPCIFeature(const virDomainDef *def, !virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("acpi-bridge-hotplug is not available with this QEMU binary")); + _("acpi-bridge-hotplug is not available " + "with this QEMU binary")); return -1; } break; -- 2.31.1

This reverts commit 5ee4f3e1d4f173f7e1b64b745ab9ef5dc8c8f393. Signed-off-by: Laine Stump <laine@redhat.com> --- NEWS.rst | 8 -------- 1 file changed, 8 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index f3b9e5f0cb..bbed7a8228 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -32,14 +32,6 @@ v7.9.0 (unreleased) controller. The default behavior is unchanged (hotplug is allowed). - * Add a new global feature for controlling ACPI PCI hotplug on bridges - - A new ``<feature>`` config option ``<acpi-bridge-hotplug>`` under ``<pci>`` - sub-element have been added to allow users enable/disable ACPI based PCI - hotplug for cold plugged bridges (that is, bridges that were present in the - domain definition when the guest was first started).This setting is only - applicable for x86 guests using qemu driver. - * **Improvements** * Use of JSON syntax with ``-device`` with upcoming QEMU-6.2 -- 2.31.1

This reverts commit bef0f0d8be6baa1d9359be208b53d6b8a37ddc95. Conflicts: tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args * this file had been renamed from its original, then renamed back, which understandably confused git. It's being completely removed here anyway, so the contents don't matter. tests/qemuxml2argvtest.c * change in context around removed chunk Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_command.c | 20 ----------- .../aarch64-acpi-hotplug-bridge-disable.err | 1 - ...pc-i440fx-acpi-hotplug-bridge-disable.args | 31 ----------------- .../pc-i440fx-acpi-hotplug-bridge-disable.err | 1 - .../q35-acpi-hotplug-bridge-disable.args | 33 ------------------- .../q35-acpi-hotplug-bridge-disable.err | 1 - tests/qemuxml2argvtest.c | 16 --------- 7 files changed, 103 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 989ddcadb8..55d26d9af6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6415,7 +6415,6 @@ qemuBuildPMCommandLine(virCommand *cmd, qemuDomainObjPrivate *priv) { virQEMUCaps *qemuCaps = priv->qemuCaps; - int acpihp_br = def->pci_features[VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG]; if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) { /* with new qemu we always want '-no-shutdown' on startup and we set @@ -6461,25 +6460,6 @@ qemuBuildPMCommandLine(virCommand *cmd, pm_object, def->pm.s4 == VIR_TRISTATE_BOOL_NO); } - if (acpihp_br != VIR_TRISTATE_SWITCH_ABSENT) { - const char *pm_object = NULL; - - if (!qemuDomainIsQ35(def) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE)) - pm_object = "PIIX4_PM"; - - if (qemuDomainIsQ35(def) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE)) - pm_object = "ICH9-LPC"; - - if (pm_object != NULL) { - virCommandAddArg(cmd, "-global"); - virCommandAddArgFormat(cmd, "%s.acpi-pci-hotplug-with-bridge-support=%s", - pm_object, - virTristateSwitchTypeToString(acpihp_br)); - } - } - return 0; } diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err deleted file mode 100644 index 9f0a88b826..0000000000 --- a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available for architecture 'aarch64' diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args deleted file mode 100644 index a1e5dc85c7..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args +++ /dev/null @@ -1,31 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-i440fx \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-i440fx/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-i440fx/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-i440fx/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name guest=i440fx,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-i440fx/master-key.aes \ --machine pc-i440fx-2.5,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-i440fx/monitor.sock,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off \ --boot strict=on \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err deleted file mode 100644 index 8c09a3cd76..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available with this QEMU binary diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args deleted file mode 100644 index ef15930e3b..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args +++ /dev/null @@ -1,33 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-q35 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-q35/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-q35/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-q35/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name guest=q35,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-q35/master-key.aes \ --machine pc-q35-2.5,accel=tcg,usb=off,dump-guest-core=off \ --m 1024 \ --realtime mlock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid 56f5055c-1b8d-490c-844a-ad646a1caaaa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-q35/monitor.sock,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off \ --boot strict=on \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err deleted file mode 100644 index 8c09a3cd76..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: acpi-bridge-hotplug is not available with this QEMU binary diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c7b69c5674..90ecbe9b1a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2570,22 +2570,6 @@ mymain(void) DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-disable", "5.1.0"); DO_TEST_CAPS_VER_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-enable", "5.1.0"); - DO_TEST("q35-acpi-hotplug-bridge-disable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); - DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); - DO_TEST_PARSE_ERROR_NOCAPS("q35-acpi-hotplug-bridge-disable"); - DO_TEST_PARSE_ERROR_NOCAPS("pc-i440fx-acpi-hotplug-bridge-disable"); - /* verify that we fail when acpi-bridge-hotplug option is specified for - * archs other than x86 - */ - DO_TEST_PARSE_ERROR_NOCAPS("aarch64-acpi-hotplug-bridge-disable"); DO_TEST("q35-usb2", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, -- 2.31.1

This reverts commit 7300ccc9b3eddb38306868534e7fc2d505a0a13c. Signed-off-by: Laine Stump <laine@redhat.com> --- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ---- src/conf/domain_conf.c | 89 +------------------ src/conf/domain_conf.h | 9 -- src/qemu/qemu_validate.c | 46 ---------- .../aarch64-acpi-hotplug-bridge-disable.xml | 33 ------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 33 ------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 33 ------- .../q35-acpi-hotplug-bridge-disable.xml | 47 ---------- .../q35-acpi-hotplug-bridge-enable.xml | 47 ---------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 1 - .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 1 - .../q35-acpi-hotplug-bridge-disable.xml | 1 - .../q35-acpi-hotplug-bridge-enable.xml | 1 - tests/qemuxml2xmltest.c | 14 --- 15 files changed, 1 insertion(+), 398 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml delete mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml delete mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 9bf59936e5..58768f7e5e 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1847,9 +1847,6 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. <e820_host state='on'/> <passthrough state='on' mode='share_pt'/> </xen> - <pci> - <acpi-bridge-hotplug state="on"/> - </pci> <pvspinlock state='on'/> <gic version='2'/> <ioapic driver='qemu'/> @@ -1945,32 +1942,6 @@ are: passthrough Enable IOMMU mappings allowing PCI passthrough on, off; mode - optional string sync_pt or share_pt :since:`6.3.0` =========== ============================================== =================================================== ============== -``pci`` - Various PCI bus related features of the hypervisor. - - ==================== ========================================================================================================= ======= ============== - Feature Description Value Since - ==================== ========================================================================================================= ======= ============== - acpi-bridge-hotplug Enable ACPI based hotplug on the cold-plugged PCI bridges (pc) and pcie-root-ports (q35) (also see notes) on, off :since:`7.9.0` - ==================== ========================================================================================================= ======= ============== - - Note: pc machine types (i440fx) have ACPI hotplug enabled by - default on cold plugged bridges (bridges that were present in the - VM's domain definition before it was started). Disabling ACPI - hotplug leaves only SHPC hotplug enabled; many OSes don't - support SHPC hotplug, so this may have the effect of completely - disabling hotplug. - - On q35 machinetypes earlier than pc-q35-6.1 (regardless of the QEMU - binary version), ACPI hotplug for cold plugged bridges is disabled - by default, and native PCIe hotplug is enabled instead. Enabling - ACPI hotplug will disable native PCIe hotplug. - - Starting with the pc-q35-6.1 machinetype, ACPI hotplug is enabled - on cold plugged bridges by default while native PCIe hotplug is - disabled. In this case, disabling ACPI hotplug will re-enable PCIe - native hotplug. - ``pmu`` Depending on the ``state`` attribute (values ``on``, ``off``, default ``on``) enable or disable the performance monitoring unit for the guest. diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 26990c4d6d..f71e375a33 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -6169,9 +6169,6 @@ <optional> <ref name="ioapic"/> </optional> - <optional> - <ref name="pci"/> - </optional> <optional> <ref name="hpt"/> </optional> @@ -6403,18 +6400,6 @@ </element> </define> - <define name="pci"> - <element name="pci"> - <interleave> - <optional> - <element name="acpi-bridge-hotplug"> - <ref name="featurestate"/> - </element> - </optional> - </interleave> - </element> - </define> - <define name="ioapic"> <element name="ioapic"> <attribute name="driver"> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 15228d1e38..2c794626f8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -172,7 +172,6 @@ VIR_ENUM_IMPL(virDomainFeature, "cfpc", "sbbc", "ibs", - "pci", ); VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -213,11 +212,6 @@ VIR_ENUM_IMPL(virDomainXen, "passthrough", ); -VIR_ENUM_IMPL(virDomainPCI, - VIR_DOMAIN_PCI_LAST, - "acpi-bridge-hotplug", -); - VIR_ENUM_IMPL(virDomainXenPassthroughMode, VIR_DOMAIN_XEN_PASSTHROUGH_MODE_LAST, "default", @@ -17564,36 +17558,6 @@ virDomainFeaturesKVMDefParse(virDomainDef *def, return 0; } -static int -virDomainFeaturesPCIDefParse(virDomainDef *def, - xmlNodePtr node) -{ - def->features[VIR_DOMAIN_FEATURE_PCI] = VIR_TRISTATE_SWITCH_ON; - - node = xmlFirstElementChild(node); - while (node) { - int feature; - virTristateSwitch value; - - feature = virDomainPCITypeFromString((const char *)node->name); - if (feature < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported PCI feature: %s"), - node->name); - return -1; - } - - if (virXMLPropTristateSwitch(node, "state", VIR_XML_PROP_REQUIRED, - &value) < 0) - return -1; - - def->pci_features[feature] = value; - - node = xmlNextElementSibling(node); - } - - return 0; -} static int virDomainFeaturesXENDefParse(virDomainDef *def, @@ -17893,10 +17857,6 @@ virDomainFeaturesDefParse(virDomainDef *def, break; } - case VIR_DOMAIN_FEATURE_PCI: - if (virDomainFeaturesPCIDefParse(def, nodes[i]) < 0) - return -1; - case VIR_DOMAIN_FEATURE_LAST: break; } @@ -17905,6 +17865,7 @@ virDomainFeaturesDefParse(virDomainDef *def, return 0; } + static int virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDef *def) { @@ -21590,7 +21551,6 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src, case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: case VIR_DOMAIN_FEATURE_CCF_ASSIST: - case VIR_DOMAIN_FEATURE_PCI: if (src->features[i] != dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of feature '%s' differs: " @@ -21847,29 +21807,6 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src, } } - /* pci */ - if (src->features[VIR_DOMAIN_FEATURE_PCI] == VIR_TRISTATE_SWITCH_ON) { - for (i = 0; i < VIR_DOMAIN_PCI_LAST; i++) { - switch ((virDomainPCI) i) { - case VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG: - if (src->pci_features[i] != dst->pci_features[i]) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of PCI feature '%s' differs: " - "source: '%s', destination: '%s'"), - virDomainPCITypeToString(i), - virTristateSwitchTypeToString(src->pci_features[i]), - virTristateSwitchTypeToString(dst->pci_features[i])); - return false; - } - - break; - - case VIR_DOMAIN_PCI_LAST: - break; - } - } - } - /* smm */ if (src->features[VIR_DOMAIN_FEATURE_SMM] == VIR_TRISTATE_SWITCH_ON) { if (src->tseg_specified != dst->tseg_specified) { @@ -28025,30 +27962,6 @@ virDomainDefFormatFeatures(virBuffer *buf, virDomainIBSTypeToString(def->features[i])); break; - case VIR_DOMAIN_FEATURE_PCI: - if (def->features[i] != VIR_TRISTATE_SWITCH_ON) - break; - - virBufferAddLit(&childBuf, "<pci>\n"); - virBufferAdjustIndent(&childBuf, 2); - for (j = 0; j < VIR_DOMAIN_PCI_LAST; j++) { - switch ((virDomainPCI) j) { - case VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG: - if (def->pci_features[j] != VIR_TRISTATE_SWITCH_ABSENT) - virBufferAsprintf(&childBuf, "<%s state='%s'/>\n", - virDomainPCITypeToString(j), - virTristateSwitchTypeToString( - def->pci_features[j])); - break; - - case VIR_DOMAIN_PCI_LAST: - break; - } - } - virBufferAdjustIndent(&childBuf, -2); - virBufferAddLit(&childBuf, "</pci>\n"); - break; - case VIR_DOMAIN_FEATURE_LAST: break; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4624bad1f7..f4be5c84f0 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2044,7 +2044,6 @@ typedef enum { VIR_DOMAIN_FEATURE_CFPC, VIR_DOMAIN_FEATURE_SBBC, VIR_DOMAIN_FEATURE_IBS, - VIR_DOMAIN_FEATURE_PCI, VIR_DOMAIN_FEATURE_LAST } virDomainFeature; @@ -2070,12 +2069,6 @@ typedef enum { VIR_DOMAIN_HYPERV_LAST } virDomainHyperv; -typedef enum { - VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG = 0, - - VIR_DOMAIN_PCI_LAST -} virDomainPCI; - typedef enum { VIR_DOMAIN_KVM_HIDDEN = 0, VIR_DOMAIN_KVM_DEDICATED, @@ -2809,7 +2802,6 @@ struct _virDomainDef { int features[VIR_DOMAIN_FEATURE_LAST]; int caps_features[VIR_DOMAIN_PROCES_CAPS_FEATURE_LAST]; int hyperv_features[VIR_DOMAIN_HYPERV_LAST]; - int pci_features[VIR_DOMAIN_PCI_LAST]; int kvm_features[VIR_DOMAIN_KVM_LAST]; int msrs_features[VIR_DOMAIN_MSRS_LAST]; int xen_features[VIR_DOMAIN_XEN_LAST]; @@ -3939,7 +3931,6 @@ VIR_ENUM_DECL(virDomainGraphicsSpiceStreamingMode); VIR_ENUM_DECL(virDomainGraphicsSpiceMouseMode); VIR_ENUM_DECL(virDomainGraphicsVNCSharePolicy); VIR_ENUM_DECL(virDomainHyperv); -VIR_ENUM_DECL(virDomainPCI); VIR_ENUM_DECL(virDomainKVM); VIR_ENUM_DECL(virDomainXen); VIR_ENUM_DECL(virDomainXenPassthroughMode); diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 0cb4542efd..98956c3eb9 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -173,48 +173,6 @@ qemuValidateDomainDefPSeriesFeature(const virDomainDef *def, return 0; } -static int -qemuValidateDomainDefPCIFeature(const virDomainDef *def, - virQEMUCaps *qemuCaps, - 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; - - for (i = 0; i < VIR_DOMAIN_PCI_LAST; i++) { - if (def->pci_features[i] == VIR_TRISTATE_SWITCH_ABSENT) - continue; - - switch ((virDomainPCI) i) { - case VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG: - if (!ARCH_IS_X86(def->os.arch)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("acpi-bridge-hotplug is not available " - "for architecture '%s'"), - virArchToString(def->os.arch)); - return -1; - } - 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; - } - break; - - case VIR_DOMAIN_PCI_LAST: - break; - } - } - return 0; -} static int qemuValidateDomainDefFeatures(const virDomainDef *def, @@ -336,10 +294,6 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, } break; - case VIR_DOMAIN_FEATURE_PCI: - if (qemuValidateDomainDefPCIFeature(def, qemuCaps, i) < 0) - return -1; - break; case VIR_DOMAIN_FEATURE_SMM: case VIR_DOMAIN_FEATURE_KVM: case VIR_DOMAIN_FEATURE_XEN: diff --git a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml deleted file mode 100644 index 0d5f945bd7..0000000000 --- a/tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml +++ /dev/null @@ -1,33 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='aarch64' machine='virt'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='off'/> - </pci> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-aarch64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml deleted file mode 100644 index 4482825858..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml +++ /dev/null @@ -1,33 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='off'/> - </pci> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml deleted file mode 100644 index 8215ee0d50..0000000000 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml +++ /dev/null @@ -1,33 +0,0 @@ -<domain type='qemu'> - <name>i440fx</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='on'/> - </pci> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml deleted file mode 100644 index 2ef3a7231f..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml +++ /dev/null @@ -1,47 +0,0 @@ -<domain type='qemu'> - <name>q35</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='off'/> - </pci> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x8'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml deleted file mode 100644 index 2e1b31b0f8..0000000000 --- a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml +++ /dev/null @@ -1,47 +0,0 @@ -<domain type='qemu'> - <name>q35</name> - <uuid>56f5055c-1b8d-490c-844a-ad646a1caaaa</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc-q35-2.5'>hvm</type> - <boot dev='network'/> - </os> - <features> - <pci> - <acpi-bridge-hotplug state='on'/> - </pci> - </features> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='sata' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <model name='ioh3420'/> - <target chassis='3' port='0x8'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> - </controller> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml deleted file mode 120000 index 8154897401..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml deleted file mode 120000 index 6b9e5492f8..0000000000 --- a/tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml deleted file mode 120000 index 77719b1325..0000000000 --- a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml b/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml deleted file mode 120000 index 3cd8ee569e..0000000000 --- a/tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.xml +++ /dev/null @@ -1 +0,0 @@ -../qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d6effbdac6..8bc4b9ff19 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -428,20 +428,6 @@ mymain(void) QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); DO_TEST("pc-i440fx-acpi-root-hotplug-enable", QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG); - DO_TEST("pc-i440fx-acpi-hotplug-bridge-disable", - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); - DO_TEST("pc-i440fx-acpi-hotplug-bridge-enable", - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE); - DO_TEST("q35-acpi-hotplug-bridge-disable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); - DO_TEST("q35-acpi-hotplug-bridge-enable", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE); DO_TEST("misc-disable-suspends", QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4); -- 2.31.1

This reverts commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5. Conflict: * src/qemu/qemu_capabilities.[ch] Because other new cap flags had been added since the original commit, reformatting was necessary to follow the "groups of five" pattern. * tests.qemucapabilitiesdata/caps_6.2.0.x86_64.xml This file was added after the original commit that we are reverting, so had to be manually edited to remove the two capabilities. Signed-off-by: Laine Stump <laine@redhat.com> --- src/qemu/qemu_capabilities.c | 8 ++------ src/qemu/qemu_capabilities.h | 6 ++---- tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 2 -- tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 2 -- 15 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c5ebf5d156..96ecf27032 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -644,12 +644,10 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-mem-pci", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI */ "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_RESERVE */ "piix4.acpi-root-pci-hotplug", /* QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG */ - "piix4.acpi-hotplug-bridge", /* QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE */ - "ich9.acpi-hotplug-bridge", /* QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE */ - - /* 415 */ "netdev.json", /* QEMU_CAPS_NETDEV_JSON */ "chardev.json", /* QEMU_CAPS_CHARDEV_JSON */ + + /* 415 */ "device.json", /* QEMU_CAPS_DEVICE_JSON */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ ); @@ -1470,7 +1468,6 @@ 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_PIIX4_ACPI_ROOT_PCI_HOTPLUG, NULL }, - { "acpi-pci-hotplug-with-bridge-support", QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = { @@ -1521,7 +1518,6 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioGpu[] = { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsICH9[] = { { "disable_s3", QEMU_CAPS_ICH9_DISABLE_S3, NULL }, { "disable_s4", QEMU_CAPS_ICH9_DISABLE_S4, NULL }, - { "acpi-pci-hotplug-with-bridge-support", QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBNECXHCI[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ac8a94a0af..796714438e 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -624,12 +624,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */ QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= */ QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-hotplug */ - QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE, /* -M pc PIIX4_PM.acpi-pci-hotplug-with-bridge-support */ - QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, /* -M q35 ICH9-LPC.acpi-pci-hotplug-with-bridge-support */ - - /* 415 */ QEMU_CAPS_NETDEV_JSON, /* -netdev accepts JSON */ QEMU_CAPS_CHARDEV_JSON, /* -chardev accepts JSON */ + + /* 415 */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml index 6544b78730..559bf16766 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -167,7 +167,6 @@ <flag name='am53c974'/> <flag name='cpu-max'/> <flag name='input-linux'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>2011000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100288</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index c66a140f8d..745110142f 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -179,7 +179,6 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>2011090</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 33daa45713..5acce281b1 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -185,7 +185,6 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100239</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml index fcfa890be9..92b3b10147 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -189,7 +189,6 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>3000092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index c87e3d46c0..28643ca67d 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -197,7 +197,6 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml index c143b16f52..7a38f44dea 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -204,7 +204,6 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>4001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index 16be4bff7c..d3dde76939 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -215,7 +215,6 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>4002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index c571cd405d..3e99e52962 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -222,7 +222,6 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index e17da3df1f..18b7897bfa 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -225,7 +225,6 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> - <flag name='piix4.acpi-hotplug-bridge'/> <version>5001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 4c6cc00545..923aa240ad 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -227,7 +227,6 @@ <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> - <flag name='piix4.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>5002000</version> <kvmVersion>0</kvmVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 0f25593887..78ede15fb3 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -235,7 +235,6 @@ <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> - <flag name='piix4.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>6000000</version> <kvmVersion>0</kvmVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 4e12d696c7..3f7ade626f 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -238,8 +238,6 @@ <flag name='virtio-mem-pci'/> <flag name='memory-backend-file.reserve'/> <flag name='piix4.acpi-root-pci-hotplug'/> - <flag name='piix4.acpi-hotplug-bridge'/> - <flag name='ich9.acpi-hotplug-bridge'/> <flag name='query-dirty-rate'/> <version>6001000</version> <kvmVersion>0</kvmVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 8e87daf536..0780ccee6d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -238,8 +238,6 @@ <flag name='virtio-mem-pci'/> <flag name='memory-backend-file.reserve'/> <flag name='piix4.acpi-root-pci-hotplug'/> - <flag name='piix4.acpi-hotplug-bridge'/> - <flag name='ich9.acpi-hotplug-bridge'/> <flag name='device.json'/> <flag name='query-dirty-rate'/> <version>6001050</version> -- 2.31.1

On a Thursday in 2021, Laine Stump wrote: [...]
Laine Stump (10): Revert "qemu: capabilities: Remove QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE" Revert "qemuxml2xmltest: Convert all acpi-hotplug control related tests to DO_TEST_CAPS_LATEST" Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug related cases" Revert "qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable'" Revert "qemuValidateDomainDefPCIFeature: Fix validation logic" Revert "qemuValidateDomainDefPCIFeature: un-break error messages" Revert "NEWS: document new acpi pci hotplug config option" Revert "qemu: command: add support for acpi-bridge-hotplug feature" Revert "conf: introduce support for acpi-bridge-hotplug feature" Revert "qemu: capablities: detect acpi-pci-hotplug-with-bridge-support"
NEWS.rst | 8 -- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ----
[...]
...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ----------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ----------- tests/qemuxml2xmltest.c | 10 +-- 33 files changed, 9 insertions(+), 794 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

On Thu, 21 Oct 2021, Ján Tomko wrote:
On a Thursday in 2021, Laine Stump wrote:
[...]
Laine Stump (10): Revert "qemu: capabilities: Remove QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE" Revert "qemuxml2xmltest: Convert all acpi-hotplug control related tests to DO_TEST_CAPS_LATEST" Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug related cases" Revert "qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable'" Revert "qemuValidateDomainDefPCIFeature: Fix validation logic" Revert "qemuValidateDomainDefPCIFeature: un-break error messages" Revert "NEWS: document new acpi pci hotplug config option" Revert "qemu: command: add support for acpi-bridge-hotplug feature" Revert "conf: introduce support for acpi-bridge-hotplug feature" Revert "qemu: capablities: detect acpi-pci-hotplug-with-bridge-support"
NEWS.rst | 8 -- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ----
[...]
...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ----------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ----------- tests/qemuxml2xmltest.c | 10 +-- 33 files changed, 9 insertions(+), 794 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>

On Thu, 21 Oct 2021, Laine Stump wrote:
Starting with commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5, support
for overriding the default hotplug method for a guest using the
<acpi-bridge-hotplug> subelement of <features>/<pci> was added to
libvirt. This uses the QEMU global commandline switch:
ICH9-LPC.acpi-pci-hotplug-with-bridge-support=<off|on>
that was added to QEMU in qemu-6.1 (along with QEMU switching the
default hotplug type for new Q35-based machinetypes from "native PCIe"
to "ACPI").
Unfortunately, soon after we pushed the <acpi-bridge-hotplug> patches
to libvirt (2 days after, to be exact), during a regular weekly
meeting I attend with some of the QEMU developers, along with bugs
that had been found in ACPI hotplug since it was made the default,
they were also discussing issues they'd found with the implementation
of the QEMU commandline switch to change back to native PCIe hotplug.
Just to be clear, this mess is for q35 side of that QEMU flag (acpi-pci-hotplug-with-bridge-support) only, not i440fx side. My libvirt patch implemented support in libvirt for both i440fx side as well as the q35 side. The i440fx flag has existed for a very long time in QEMU and hence it seems it is stable as there has been no known issues around it reported (there was one issue I found in QEMU last year which I since fixed). That being said, up until now there has been no motivation from the upstream community to implement an equivalent switch in libvirt for only i440fx. Clearly few people really care about that QEMU flag on i440fx side and those who do can use the libvirt bypass mechanism to pass the QEMU commandline directly. The main motiovation for my libvirt work also was to allow users control/flip ACPI based hotplug on the q35 side for pcie-root-ports in a libvirt friendly manner. i440fx side came along the way for a free ride.
Apparently the current method used by
acpi-pci-hotplug-with-bridge-support is causing "confusion" in guests,
so they were talking about the possibility of changing what the switch
does (or replacing it), and suggested that libvirt should "hold off"
on supporting it for now. (oops) (they didn't know that we had just
pushed Ani's patches that used it)
Since the current QEMU option is doomed to either changed behavior
(which would result in a guest-visible ABI change) or full deprecation
and replacement, it would be better for libvirt to not use it at all,
and re-implement based on whatever replacement QEMU comes up
with.
Once a new XML element has appeared in a libvirt upstream
release, we are committed to keeping it there "forever". However,
since there has not yet been an upstream release since
<acpi-bridge-hotplug> was added, there is still time to revert and
avoid the endless support/maintenance burden.
Not much time though! And that is the purpose of this patch
series. They revert, in reverse order, Ani's 4 original patches adding
the feature, along with Peter's 6 followup patches that correct a
logic error and streamline/beef up the unit tests.
(Note that it is still possible that QEMU would figure out a way out
of this without modifying their current flag in any significant way,
and in that case we could always "re-apply" the original
patches. However, if we don't revert before the next release (Andrea
has pointed out the freeze for RC1 is next Tuesday, and it would be
best to have it done before then), we will no longer have the option
to remove it.)
There was some conflict resolution necessary after the "git revert"
commands, due to other unrelated patches that changed test case data,
and due to a couple of Peter's patches also touching up the i440fx
pci-root-hotplug disabling test cases (which are *not* being reverted
- they work as advertised!).
Note that this series involves *re-adding* some things, just to remove
them again in a later revert - this is because Peter's patches
effectively reverted the addition of a QEMU capability flag that had
been added in Ani's original patches. If anyone would prefer, I can
squash those patches together so that the extra dance is eliminated
from the diffs; it just seemed more mechanical to do it this way
though.
A more detailed explanation of the issue:
Current Behavior of existing QEMU option
========================================
As far as I understand (and keep in mind that I have misunderstood and
misinterpreted this *at least* 4 separate times since it was first
explained to me!), the effect of this QEMU setting:
-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on
is to:
1) enable ACPI hotplug (i.e. expose it to the guest)
2) disable native PCIe hotplug (don't expose it to the guest)
By having only one of the two types of hotplug enabled, the intent is
to force the guest to use the still-enabled type of hotplug.
Unfortunately, after QEMU 6.1 was released with acpi-pci-hotplug=on as
the default for new machinetypes, problems were encountered with ACPI
hotplug, which caused more attention to be called to the QEMU switch,
and the people looking into that found that enabling ACPI and
disabling native PCIe hotplug doesn't necessarily have the desired
effect of causing the guest to use ACPI for hotplug (or maybe it was
the opposite direction). Instead, it "gets confused" (a very technical
term, I know. You can ask Julia or Michael for a definition :-)).
One possible fix that they talked about was changing the behavior of
ICH9-LPC.acpi-pci-hotplug-with-bridge-support:
Potential Change to Behavior of QEMU option
===========================================
I know it's more complex than this (again, Julia or Michael can
explain), but my basic understanding of the way that they're currently
thinking of modifying the acpi-pci-hotplug-with-bridge-support option
is to have everything the same, *except* that when acpi-hotplug=off,
ACPI hotplug will *still be enabled* along with native PCIe hotplug;
but because guest OSes prefer native hotplug over ACPI, native PCIe
hotplug will be chosen in that case. (Presumably this change prevents
the "confusion" that is seen with the existing behavior of the
option).
So essentially, the choice of whether to use ACPI is controlled by
enabling/disabling native PCIe hotplug (which *kind of* goes against
the libvirt philosophy of "the XML describes the virtual machine that
is presented to the guest"; instead it becomes "the XML describes how
the guest will behave").
Another possibility would be to completely scrap (well, deprecate and
later remove) the current QEMU commandline switch in favor of one or
more switches that behave differently but result in the desired
behavior.
In either case, I think the best course of action for libvirt is to
revert the current <acpi-bridge-hotplug>, wait until QEMU settles down
with a new workable set of switches, and then re-do libvirt support
based on that.
Laine Stump (10):
Revert "qemu: capabilities: Remove
QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE"
Revert "qemuxml2xmltest: Convert all acpi-hotplug control related
tests to DO_TEST_CAPS_LATEST"
Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug
related cases"
Revert "qemuxml2argvtest: Use real-caps testing for
'acpi-hotplug-bridge-disable'"
Revert "qemuValidateDomainDefPCIFeature: Fix validation logic"
Revert "qemuValidateDomainDefPCIFeature: un-break error messages"
Revert "NEWS: document new acpi pci hotplug config option"
Revert "qemu: command: add support for acpi-bridge-hotplug feature"
Revert "conf: introduce support for acpi-bridge-hotplug feature"
Revert "qemu: capablities: detect
acpi-pci-hotplug-with-bridge-support"
NEWS.rst | 8 --
docs/formatdomain.rst | 29 ------
docs/schemas/domaincommon.rng | 15 ----
src/conf/domain_conf.c | 89 +------------------
src/conf/domain_conf.h | 9 --
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_command.c | 19 ----
src/qemu/qemu_validate.c | 41 ---------
.../caps_6.1.0.x86_64.xml | 1 -
.../caps_6.2.0.x86_64.xml | 1 -
...-hotplug-bridge-disable.aarch64-latest.err | 1 -
.../aarch64-acpi-hotplug-bridge-disable.xml | 13 ---
...-hotplug-bridge-disable.x86_64-latest.args | 34 -------
.../pc-i440fx-acpi-hotplug-bridge-disable.xml | 33 -------
...i-hotplug-bridge-enable.x86_64-latest.args | 34 -------
.../pc-i440fx-acpi-hotplug-bridge-enable.xml | 33 -------
...pi-hotplug-bridge-disable.x86_64-6.0.0.err | 1 -
...-hotplug-bridge-disable.x86_64-latest.args | 37 --------
.../q35-acpi-hotplug-bridge-disable.xml | 47 ----------
...cpi-hotplug-bridge-enable.x86_64-6.0.0.err | 1 -
...i-hotplug-bridge-enable.x86_64-latest.args | 37 --------
.../q35-acpi-hotplug-bridge-enable.xml | 47 ----------
tests/qemuxml2argvtest.c | 10 ---
...i-hotplug-bridge-disable.x86_64-latest.xml | 36 --------
...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 --------
...cpi-root-hotplug-disable.x86_64-latest.xml | 33 -------
.../pc-i440fx-acpi-root-hotplug-disable.xml | 1 +
...acpi-root-hotplug-enable.x86_64-latest.xml | 33 -------
.../pc-i440fx-acpi-root-hotplug-enable.xml | 1 +
...i-hotplug-bridge-disable.x86_64-latest.xml | 53 -----------
...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 -----------
tests/qemuxml2xmltest.c | 10 +--
33 files changed, 9 insertions(+), 794 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err
delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml
delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml
delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml
delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml
delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml
delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml
--
2.31.1

On Thu, Oct 21, 2021 at 9:55 PM Laine Stump <laine@redhat.com> wrote:
Starting with commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5, support for overriding the default hotplug method for a guest using the <acpi-bridge-hotplug> subelement of <features>/<pci> was added to libvirt. This uses the QEMU global commandline switch:
ICH9-LPC.acpi-pci-hotplug-with-bridge-support=<off|on>
that was added to QEMU in qemu-6.1 (along with QEMU switching the default hotplug type for new Q35-based machinetypes from "native PCIe" to "ACPI").
Unfortunately, soon after we pushed the <acpi-bridge-hotplug> patches to libvirt (2 days after, to be exact), during a regular weekly meeting I attend with some of the QEMU developers, along with bugs that had been found in ACPI hotplug since it was made the default, they were also discussing issues they'd found with the implementation of the QEMU commandline switch to change back to native PCIe hotplug.
Apparently the current method used by acpi-pci-hotplug-with-bridge-support is causing "confusion" in guests, so they were talking about the possibility of changing what the switch does (or replacing it), and suggested that libvirt should "hold off" on supporting it for now. (oops) (they didn't know that we had just pushed Ani's patches that used it)
Since the current QEMU option is doomed to either changed behavior (which would result in a guest-visible ABI change) or full deprecation and replacement, it would be better for libvirt to not use it at all, and re-implement based on whatever replacement QEMU comes up with.
Thread to keep an eye on: https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg02459.html There will likely be other fixes too, from Gerd for example.
Once a new XML element has appeared in a libvirt upstream release, we are committed to keeping it there "forever". However, since there has not yet been an upstream release since <acpi-bridge-hotplug> was added, there is still time to revert and avoid the endless support/maintenance burden.
Not much time though! And that is the purpose of this patch series. They revert, in reverse order, Ani's 4 original patches adding the feature, along with Peter's 6 followup patches that correct a logic error and streamline/beef up the unit tests.
(Note that it is still possible that QEMU would figure out a way out of this without modifying their current flag in any significant way, and in that case we could always "re-apply" the original patches. However, if we don't revert before the next release (Andrea has pointed out the freeze for RC1 is next Tuesday, and it would be best to have it done before then), we will no longer have the option to remove it.)
There was some conflict resolution necessary after the "git revert" commands, due to other unrelated patches that changed test case data, and due to a couple of Peter's patches also touching up the i440fx pci-root-hotplug disabling test cases (which are *not* being reverted - they work as advertised!).
Note that this series involves *re-adding* some things, just to remove them again in a later revert - this is because Peter's patches effectively reverted the addition of a QEMU capability flag that had been added in Ani's original patches. If anyone would prefer, I can squash those patches together so that the extra dance is eliminated from the diffs; it just seemed more mechanical to do it this way though.
A more detailed explanation of the issue:
Current Behavior of existing QEMU option ========================================
As far as I understand (and keep in mind that I have misunderstood and misinterpreted this *at least* 4 separate times since it was first explained to me!), the effect of this QEMU setting:
-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on
is to:
1) enable ACPI hotplug (i.e. expose it to the guest) 2) disable native PCIe hotplug (don't expose it to the guest)
By having only one of the two types of hotplug enabled, the intent is to force the guest to use the still-enabled type of hotplug.
Unfortunately, after QEMU 6.1 was released with acpi-pci-hotplug=on as the default for new machinetypes, problems were encountered with ACPI hotplug, which caused more attention to be called to the QEMU switch, and the people looking into that found that enabling ACPI and disabling native PCIe hotplug doesn't necessarily have the desired effect of causing the guest to use ACPI for hotplug (or maybe it was the opposite direction). Instead, it "gets confused" (a very technical term, I know. You can ask Julia or Michael for a definition :-)).
One possible fix that they talked about was changing the behavior of ICH9-LPC.acpi-pci-hotplug-with-bridge-support:
Potential Change to Behavior of QEMU option ===========================================
I know it's more complex than this (again, Julia or Michael can explain), but my basic understanding of the way that they're currently thinking of modifying the acpi-pci-hotplug-with-bridge-support option is to have everything the same, *except* that when acpi-hotplug=off, ACPI hotplug will *still be enabled* along with native PCIe hotplug; but because guest OSes prefer native hotplug over ACPI, native PCIe hotplug will be chosen in that case. (Presumably this change prevents the "confusion" that is seen with the existing behavior of the option).
So essentially, the choice of whether to use ACPI is controlled by enabling/disabling native PCIe hotplug (which *kind of* goes against the libvirt philosophy of "the XML describes the virtual machine that is presented to the guest"; instead it becomes "the XML describes how the guest will behave").
Another possibility would be to completely scrap (well, deprecate and later remove) the current QEMU commandline switch in favor of one or more switches that behave differently but result in the desired behavior.
In either case, I think the best course of action for libvirt is to revert the current <acpi-bridge-hotplug>, wait until QEMU settles down with a new workable set of switches, and then re-do libvirt support based on that.
Laine Stump (10): Revert "qemu: capabilities: Remove QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE" Revert "qemuxml2xmltest: Convert all acpi-hotplug control related tests to DO_TEST_CAPS_LATEST" Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug related cases" Revert "qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable'" Revert "qemuValidateDomainDefPCIFeature: Fix validation logic" Revert "qemuValidateDomainDefPCIFeature: un-break error messages" Revert "NEWS: document new acpi pci hotplug config option" Revert "qemu: command: add support for acpi-bridge-hotplug feature" Revert "conf: introduce support for acpi-bridge-hotplug feature" Revert "qemu: capablities: detect acpi-pci-hotplug-with-bridge-support"
NEWS.rst | 8 -- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ---- src/conf/domain_conf.c | 89 +------------------ src/conf/domain_conf.h | 9 -- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_command.c | 19 ---- src/qemu/qemu_validate.c | 41 --------- .../caps_6.1.0.x86_64.xml | 1 - .../caps_6.2.0.x86_64.xml | 1 - ...-hotplug-bridge-disable.aarch64-latest.err | 1 - .../aarch64-acpi-hotplug-bridge-disable.xml | 13 --- ...-hotplug-bridge-disable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 33 ------- ...i-hotplug-bridge-enable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 33 ------- ...pi-hotplug-bridge-disable.x86_64-6.0.0.err | 1 - ...-hotplug-bridge-disable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-disable.xml | 47 ---------- ...cpi-hotplug-bridge-enable.x86_64-6.0.0.err | 1 - ...i-hotplug-bridge-enable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-enable.xml | 47 ---------- tests/qemuxml2argvtest.c | 10 --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 -------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 -------- ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ----------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ----------- tests/qemuxml2xmltest.c | 10 +-- 33 files changed, 9 insertions(+), 794 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml
-- 2.31.1

On Thu, 11 Nov 2021, Ani Sinha wrote:
On Thu, Oct 21, 2021 at 9:55 PM Laine Stump <laine@redhat.com> wrote:
Starting with commit 58ba0f6a3d7342fba29edbbf2bb9cb5497c870e5, support for overriding the default hotplug method for a guest using the <acpi-bridge-hotplug> subelement of <features>/<pci> was added to libvirt. This uses the QEMU global commandline switch:
ICH9-LPC.acpi-pci-hotplug-with-bridge-support=<off|on>
that was added to QEMU in qemu-6.1 (along with QEMU switching the default hotplug type for new Q35-based machinetypes from "native PCIe" to "ACPI").
Unfortunately, soon after we pushed the <acpi-bridge-hotplug> patches to libvirt (2 days after, to be exact), during a regular weekly meeting I attend with some of the QEMU developers, along with bugs that had been found in ACPI hotplug since it was made the default, they were also discussing issues they'd found with the implementation of the QEMU commandline switch to change back to native PCIe hotplug.
Apparently the current method used by acpi-pci-hotplug-with-bridge-support is causing "confusion" in guests, so they were talking about the possibility of changing what the switch does (or replacing it), and suggested that libvirt should "hold off" on supporting it for now. (oops) (they didn't know that we had just pushed Ani's patches that used it)
Since the current QEMU option is doomed to either changed behavior (which would result in a guest-visible ABI change) or full deprecation and replacement, it would be better for libvirt to not use it at all, and re-implement based on whatever replacement QEMU comes up with.
Thread to keep an eye on: https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg02459.html
There will likely be other fixes too, from Gerd for example.
So basically three things happened post Qemu 6.1: (a) We are not going to use HPC bit for PCIE ports to disable or enable native hotplug. Instead we are using ACPI OSC method to enable/disable native hotplug advertizement. Qemu folks think that using OSC method and leaving HPC bit as is would prevent the guests from getting confused (or bumping into IO address space allocation issues that we had seen in qemu 6.1). (b) Gerd has pushed some fixes on the PCIE native hotplug side in order to address the issues which had caused us to move away from native hotplug towards ACPI hotplug on q35. It is yet to be seen if those patches fully address all the issues on native hotplug (they probably do not atm). (c) The default hotplug for q35 remains ACPI base hotplug and the switch that my patch was using to toggle this remains as is. a) and b) are Qemu internal details which libvirt should not care about (other than maybe document it?). I will give some soak time for these changes post Qemu 6.2 release. We need to see if there are any new issues reported upstream (or Redhat internal QE reports any to which I have no visibility). If all goes fine, I am hoping we can resurrect my patchset again and unrevert the revert with some minor adjustments.
Once a new XML element has appeared in a libvirt upstream release, we are committed to keeping it there "forever". However, since there has not yet been an upstream release since <acpi-bridge-hotplug> was added, there is still time to revert and avoid the endless support/maintenance burden.
Not much time though! And that is the purpose of this patch series. They revert, in reverse order, Ani's 4 original patches adding the feature, along with Peter's 6 followup patches that correct a logic error and streamline/beef up the unit tests.
(Note that it is still possible that QEMU would figure out a way out of this without modifying their current flag in any significant way, and in that case we could always "re-apply" the original patches. However, if we don't revert before the next release (Andrea has pointed out the freeze for RC1 is next Tuesday, and it would be best to have it done before then), we will no longer have the option to remove it.)
There was some conflict resolution necessary after the "git revert" commands, due to other unrelated patches that changed test case data, and due to a couple of Peter's patches also touching up the i440fx pci-root-hotplug disabling test cases (which are *not* being reverted - they work as advertised!).
Note that this series involves *re-adding* some things, just to remove them again in a later revert - this is because Peter's patches effectively reverted the addition of a QEMU capability flag that had been added in Ani's original patches. If anyone would prefer, I can squash those patches together so that the extra dance is eliminated from the diffs; it just seemed more mechanical to do it this way though.
A more detailed explanation of the issue:
Current Behavior of existing QEMU option ========================================
As far as I understand (and keep in mind that I have misunderstood and misinterpreted this *at least* 4 separate times since it was first explained to me!), the effect of this QEMU setting:
-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on
is to:
1) enable ACPI hotplug (i.e. expose it to the guest) 2) disable native PCIe hotplug (don't expose it to the guest)
By having only one of the two types of hotplug enabled, the intent is to force the guest to use the still-enabled type of hotplug.
Unfortunately, after QEMU 6.1 was released with acpi-pci-hotplug=on as the default for new machinetypes, problems were encountered with ACPI hotplug, which caused more attention to be called to the QEMU switch, and the people looking into that found that enabling ACPI and disabling native PCIe hotplug doesn't necessarily have the desired effect of causing the guest to use ACPI for hotplug (or maybe it was the opposite direction). Instead, it "gets confused" (a very technical term, I know. You can ask Julia or Michael for a definition :-)).
One possible fix that they talked about was changing the behavior of ICH9-LPC.acpi-pci-hotplug-with-bridge-support:
Potential Change to Behavior of QEMU option ===========================================
I know it's more complex than this (again, Julia or Michael can explain), but my basic understanding of the way that they're currently thinking of modifying the acpi-pci-hotplug-with-bridge-support option is to have everything the same, *except* that when acpi-hotplug=off, ACPI hotplug will *still be enabled* along with native PCIe hotplug; but because guest OSes prefer native hotplug over ACPI, native PCIe hotplug will be chosen in that case. (Presumably this change prevents the "confusion" that is seen with the existing behavior of the option).
So essentially, the choice of whether to use ACPI is controlled by enabling/disabling native PCIe hotplug (which *kind of* goes against the libvirt philosophy of "the XML describes the virtual machine that is presented to the guest"; instead it becomes "the XML describes how the guest will behave").
Another possibility would be to completely scrap (well, deprecate and later remove) the current QEMU commandline switch in favor of one or more switches that behave differently but result in the desired behavior.
In either case, I think the best course of action for libvirt is to revert the current <acpi-bridge-hotplug>, wait until QEMU settles down with a new workable set of switches, and then re-do libvirt support based on that.
Laine Stump (10): Revert "qemu: capabilities: Remove QEMU_CAPS_PIIX4_ACPI_HOTPLUG_BRIDGE" Revert "qemuxml2xmltest: Convert all acpi-hotplug control related tests to DO_TEST_CAPS_LATEST" Revert "qemuxml2argvtest: Add '-enable' variants for ACPI-hotplug related cases" Revert "qemuxml2argvtest: Use real-caps testing for 'acpi-hotplug-bridge-disable'" Revert "qemuValidateDomainDefPCIFeature: Fix validation logic" Revert "qemuValidateDomainDefPCIFeature: un-break error messages" Revert "NEWS: document new acpi pci hotplug config option" Revert "qemu: command: add support for acpi-bridge-hotplug feature" Revert "conf: introduce support for acpi-bridge-hotplug feature" Revert "qemu: capablities: detect acpi-pci-hotplug-with-bridge-support"
NEWS.rst | 8 -- docs/formatdomain.rst | 29 ------ docs/schemas/domaincommon.rng | 15 ---- src/conf/domain_conf.c | 89 +------------------ src/conf/domain_conf.h | 9 -- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_command.c | 19 ---- src/qemu/qemu_validate.c | 41 --------- .../caps_6.1.0.x86_64.xml | 1 - .../caps_6.2.0.x86_64.xml | 1 - ...-hotplug-bridge-disable.aarch64-latest.err | 1 - .../aarch64-acpi-hotplug-bridge-disable.xml | 13 --- ...-hotplug-bridge-disable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-disable.xml | 33 ------- ...i-hotplug-bridge-enable.x86_64-latest.args | 34 ------- .../pc-i440fx-acpi-hotplug-bridge-enable.xml | 33 ------- ...pi-hotplug-bridge-disable.x86_64-6.0.0.err | 1 - ...-hotplug-bridge-disable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-disable.xml | 47 ---------- ...cpi-hotplug-bridge-enable.x86_64-6.0.0.err | 1 - ...i-hotplug-bridge-enable.x86_64-latest.args | 37 -------- .../q35-acpi-hotplug-bridge-enable.xml | 47 ---------- tests/qemuxml2argvtest.c | 10 --- ...i-hotplug-bridge-disable.x86_64-latest.xml | 36 -------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 36 -------- ...cpi-root-hotplug-disable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-disable.xml | 1 + ...acpi-root-hotplug-enable.x86_64-latest.xml | 33 ------- .../pc-i440fx-acpi-root-hotplug-enable.xml | 1 + ...i-hotplug-bridge-disable.x86_64-latest.xml | 53 ----------- ...pi-hotplug-bridge-enable.x86_64-latest.xml | 53 ----------- tests/qemuxml2xmltest.c | 10 +-- 33 files changed, 9 insertions(+), 794 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-6.0.0.err delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml delete mode 100644 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml
-- 2.31.1
participants (3)
-
Ani Sinha
-
Ján Tomko
-
Laine Stump