]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines
authorAni Sinha <ani@anisinha.ca>
Fri, 1 Oct 2021 09:29:45 +0000 (14:59 +0530)
committerLaine Stump <laine@redhat.com>
Fri, 1 Oct 2021 18:19:41 +0000 (14:19 -0400)
The following change in qemu added support for a global boolean flag specific
to i440fx machines that would turn off or on acpi based hotplug for pci root
bus:

3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus")

The option is passed as "-global PIIX4_PM.acpi-root-pci-hotplug=on" etc in qemu
commandline. It is enabled by default. This patch adds the corresponding qemu
capabilities in libvirt as QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG.

Please note that the test specific qemu capabilities .replies files has already
been updated as a part of regular refreshing them when a new qemu version is
released. Hence, no updates to those files are required.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml

index 3d729099e9c2b8b3c8e57f0159bb6e3913578237..6d1389af879bea85100f5f4463b66bf462936d05 100644 (file)
@@ -643,6 +643,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               /* 410 */
               "virtio-mem-pci", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI */
               "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_RESERVE */
+              "piix4-acpi-root-hotplug-en", /* QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG */
     );
 
 
@@ -1470,6 +1471,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = {
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = {
     { "disable_s3", QEMU_CAPS_PIIX_DISABLE_S3, NULL },
     { "disable_s4", QEMU_CAPS_PIIX_DISABLE_S4, NULL },
+    { "acpi-root-pci-hotplug", QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = {
index 6d544e92c4ba4614174b5b89083e5aa835cf3f09..867c94cb3d184019cf220438dba52b015cc822d2 100644 (file)
@@ -623,6 +623,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 410 */
     QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */
     QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= */
+    QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci-hotplug */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index f597f52771714614c2d6231125baf18dc8934d38..79d36bf19f8fd1dd5adf1bca609db7f2500c4943 100644 (file)
   <flag name='query-display-options'/>
   <flag name='virtio-blk.queue-size'/>
   <flag name='virtio-mem-pci'/>
+  <flag name='piix4-acpi-root-hotplug-en'/>
   <version>5002000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100243</microcodeVersion>
index dde3ba17e812aaf14e99e0a062181207e61dcbc5..0d8edef6a1a68207b886d4ddc0565e0478b0ce78 100644 (file)
   <flag name='set-action'/>
   <flag name='virtio-blk.queue-size'/>
   <flag name='virtio-mem-pci'/>
+  <flag name='piix4-acpi-root-hotplug-en'/>
   <version>6000000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100242</microcodeVersion>
index 518c0cea7736872e82cb705a97e52fca70d4cddd..7ba3b328ca58773eabe6fb331799c2e25fbb5fcf 100644 (file)
   <flag name='virtio-blk.queue-size'/>
   <flag name='virtio-mem-pci'/>
   <flag name='memory-backend-file.reserve'/>
+  <flag name='piix4-acpi-root-hotplug-en'/>
   <version>6001000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100243</microcodeVersion>