]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: probe for "acpi-index" property
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 6 Apr 2021 10:41:20 +0000 (11:41 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 7 Apr 2021 17:11:11 +0000 (18:11 +0100)
This property is exposed by QEMU on any PCI device, but we have to pick
some specific device(s) to probe it against. We expect that at least one
of the virtio devices will be present, so probe against them.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml

index 41ef199a79f7f36295e63106a9c3562a58fa507e..37ed750f8b1b3751e7402534b3baeee25eed9f3c 100644 (file)
@@ -628,6 +628,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
               /* 400 */
               "compat-deprecated",
+              "acpi-index",
     );
 
 
@@ -1366,6 +1367,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBalloon[]
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL },
     { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
     { "free-page-reporting", QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING, NULL },
+    { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
 
@@ -1398,6 +1400,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = {
     { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
     { "werror", QEMU_CAPS_STORAGE_WERROR, NULL },
     { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
+    { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
@@ -1411,6 +1414,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL },
     { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL },
     { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
+    { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPort[] = {
@@ -1431,6 +1435,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioSCSI[] = {
     { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, NULL },
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL },
     { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
+    { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVfioPCI[] = {
@@ -1502,6 +1507,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioGpu[] = {
     { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, NULL },
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL },
     { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
+    { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsICH9[] = {
index c553a5f4a4fac5231371c5257137fa53c39cf824..1ca9c1ea7b702b4d054d82775eec6b81d805b10d 100644 (file)
@@ -608,6 +608,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 400 */
     QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is supported */
+    QEMU_CAPS_ACPI_INDEX, /* PCI device 'acpi-index' property */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index 8d12645a8e81283da3fa434118d223e88491cbe4..8cc949d735dc2467bbaad96516d726d3bc87cc7c 100644 (file)
   <flag name='object.qapified'/>
   <flag name='rotation-rate'/>
   <flag name='compat-deprecated'/>
+  <flag name='acpi-index'/>
   <version>5002092</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100242</microcodeVersion>