Re: [PATCH v3 1/5] qemu: capablities: detect presence of acpi-pci-hotplug-with-bridge-support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/11/21 11:26 PM, Ani Sinha wrote:
qemu added support for i440fx specific global boolean flag

PIIX4_PM.acpi-pci-hotplug-with-bridge-support

around version 2.1. This flag is enabled by default. When disabled, it turns
off acpi pci hotplug for cold plugged pci bridges in i440fx machine types.

Very recently, in qemu version 6.1, the same global option was also added for
q35 machine types as well.

ICH9-LPC.acpi-pci-hotplug-with-bridge-support

This option turns on or off acpi based hotplug for cold plugged pcie bridges
like pcie root ports. This flag is also enabled by default. Please refer to
the following qemu changes:

c0e427d6eb5fef ("hw/acpi/ich9: Enable ACPI PCI hot-plug")
17858a16950860 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35")

This patch adds the corresponding qemu capabilities in libvirt. For i440fx,
the capability is detected as QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE. For q35,
the capability is detected as QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE.

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@xxxxxxxxxxx>

Reviewed-by: Laine Stump <laine@xxxxxxxxxx>

except that it needs rebasing since upstream has added another capability in the meantime.

---
  src/qemu/qemu_capabilities.c                      | 6 ++++++
  src/qemu/qemu_capabilities.h                      | 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  | 2 ++
  14 files changed, 23 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f27a621f8c..c954e42382 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -638,6 +638,10 @@ VIR_ENUM_IMPL(virQEMUCaps,
                "query-display-options", /* QEMU_CAPS_QUERY_DISPLAY_OPTIONS */
                "s390-pv-guest", /* QEMU_CAPS_S390_PV_GUEST */
                "set-action", /* QEMU_CAPS_SET_ACTION */
+              "piix4-acpi-hotplug-bridge", /* QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE */
+
+              /* 410 */
+              "ich9-acpi-hotplug-bridge", /* QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE */
      );
@@ -1465,6 +1469,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-pci-hotplug-with-bridge-support", QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE, NULL },
  };
static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = {
@@ -1517,6 +1522,7 @@ 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 f3379f556c..f53009b6e9 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -618,6 +618,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
      QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */
      QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */
      QEMU_CAPS_SET_ACTION, /* 'set-action' QMP command */
+    QEMU_CAPS_PIIX_ACPI_HOTPLUG_BRIDGE, /* -M pc PIIX4_PM.acpi-pci-hotplug-with-bridge-support */
+
+    /* 410 */
+    QEMU_CAPS_ICH9_ACPI_HOTPLUG_BRIDGE, /* -M q35 ICH9-LPC.acpi-pci-hotplug-with-bridge-support */
QEMU_CAPS_LAST /* this must always be the last item */
  } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
index 631f644144..e557e9395d 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
@@ -189,6 +189,7 @@
    <flag name='cpu-max'/>
    <flag name='vnc-opts'/>
    <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 d74dc5ebd5..c70e81ac0b 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -200,6 +200,7 @@
    <flag name='cpu-max'/>
    <flag name='vnc-opts'/>
    <flag name='input-linux'/>
+  <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 2cc3c11820..20f58b120f 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -206,6 +206,7 @@
    <flag name='cpu-max'/>
    <flag name='vnc-opts'/>
    <flag name='input-linux'/>
+  <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 bcc4c44d28..275415b1a7 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
@@ -210,6 +210,7 @@
    <flag name='vnc-opts'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 e999d7574c..3356602fa7 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
@@ -218,6 +218,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 80c3e3cbed..4ee761c4cb 100644
--- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
@@ -225,6 +225,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 99f9375c04..cc59ffb331 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -236,6 +236,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 03fc7d4106..40b2a61aaa 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -243,6 +243,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 fc0b502ef9..28c7b0e020 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
@@ -245,6 +245,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <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 cb1226fc04..126bae2401 100644
--- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
@@ -246,6 +246,7 @@
    <flag name='rotation-rate'/>
    <flag name='input-linux'/>
    <flag name='query-display-options'/>
+  <flag name='piix4-acpi-hotplug-bridge'/>
    <version>5002000</version>
    <kvmVersion>0</kvmVersion>
    <microcodeVersion>43100243</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
index d03b8aa726..b01db2dfbe 100644
--- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
@@ -254,6 +254,7 @@
    <flag name='confidential-guest-support'/>
    <flag name='query-display-options'/>
    <flag name='set-action'/>
+  <flag name='piix4-acpi-hotplug-bridge'/>
    <version>6000000</version>
    <kvmVersion>0</kvmVersion>
    <microcodeVersion>43100242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
index 8239f4266a..b136853aba 100644
--- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
@@ -256,6 +256,8 @@
    <flag name='confidential-guest-support'/>
    <flag name='query-display-options'/>
    <flag name='set-action'/>
+  <flag name='piix4-acpi-hotplug-bridge'/>
+  <flag name='ich9-acpi-hotplug-bridge'/>
    <version>6001000</version>
    <kvmVersion>0</kvmVersion>
    <microcodeVersion>43100243</microcodeVersion>





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux