[PATCH 1/3] qemu: Take full advantage of conditional device property probing

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

 



Commit 4ae59411fa3f introduced the ability to make probing for
device properties conditional on a capability being set, but
didn't extend the use of this feature to existing devices.

This commit does the last bit of work, which results in a lot
of pointless QMP chatter no longer happening and our test suite
shrinking a fair bit.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
"I have discovered a truly marvelous diff for this, which this
 mailing list is too narrow to contain." - Pierre de Fermat, 1637

The full version can be fetched from

  https://github.com/andreabolognani/libvirt/tree/caps-cleanup

 src/qemu/qemu_capabilities.c                       |  34 +++----
 .../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 102 ++++++-------------
 tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_1.3.1.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_1.4.2.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_1.5.3.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_1.6.0.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_1.7.0.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.1.1.x86_64.replies |  90 ++++++-----------
 tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml   |   2 +-
 .../caps_2.10.0-gicv2.aarch64.replies              | 100 ++++++-------------
 .../caps_2.10.0-gicv2.aarch64.xml                  |   2 +-
 .../caps_2.10.0-gicv3.aarch64.replies              | 100 ++++++-------------
 .../caps_2.10.0-gicv3.aarch64.xml                  |   2 +-
 .../qemucapabilitiesdata/caps_2.10.0.ppc64.replies | 100 ++++++-------------
 tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 108 +++++----------------
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |   2 +-
 .../caps_2.10.0.x86_64.replies                     |  90 +++++++----------
 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |   2 +-
 .../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 108 +++++----------------
 tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.4.0.x86_64.replies |  80 ++++++---------
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.5.0.x86_64.replies |  82 +++++++---------
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |   2 +-
 .../caps_2.6.0-gicv2.aarch64.replies               | 100 ++++++-------------
 .../caps_2.6.0-gicv2.aarch64.xml                   |   2 +-
 .../caps_2.6.0-gicv3.aarch64.replies               | 100 ++++++-------------
 .../caps_2.6.0-gicv3.aarch64.xml                   |   2 +-
 .../qemucapabilitiesdata/caps_2.6.0.ppc64.replies  | 100 ++++++-------------
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml    |   2 +-
 .../qemucapabilitiesdata/caps_2.6.0.x86_64.replies |  82 +++++++---------
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.7.0.s390x.replies  | 104 +++++---------------
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml    |   2 +-
 .../qemucapabilitiesdata/caps_2.7.0.x86_64.replies |  82 +++++++---------
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.8.0.s390x.replies  | 108 +++++----------------
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +-
 .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies |  82 +++++++---------
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +-
 .../qemucapabilitiesdata/caps_2.9.0.ppc64.replies  | 100 ++++++-------------
 tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml    |   2 +-
 .../qemucapabilitiesdata/caps_2.9.0.s390x.replies  | 108 +++++----------------
 tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml    |   2 +-
 .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies |  90 +++++++----------
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |   2 +-
 53 files changed, 820 insertions(+), 1732 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b5eb8cf46a..4dec0046df 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1838,25 +1838,25 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       -1 },
     { "virtio-net-pci", virQEMUCapsObjectPropsVirtioNet,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
-      -1 },
+      QEMU_CAPS_DEVICE_VIRTIO_NET },
     { "virtio-scsi-pci", virQEMUCapsObjectPropsVirtioSCSI,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI),
-      -1 },
+      QEMU_CAPS_VIRTIO_SCSI },
     { "virtio-blk-ccw", virQEMUCapsObjectPropsVirtioBlk,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk),
-      -1 },
+      QEMU_CAPS_VIRTIO_CCW },
     { "virtio-net-ccw", virQEMUCapsObjectPropsVirtioNet,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
-      -1 },
+      QEMU_CAPS_DEVICE_VIRTIO_NET },
     { "virtio-scsi-ccw", virQEMUCapsObjectPropsVirtioSCSI,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI),
-      -1 },
+      QEMU_CAPS_VIRTIO_SCSI },
     { "virtio-blk-s390", virQEMUCapsObjectPropsVirtioBlk,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk),
-      -1 },
+      QEMU_CAPS_VIRTIO_S390 },
     { "virtio-net-s390", virQEMUCapsObjectPropsVirtioNet,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
-      -1 },
+      QEMU_CAPS_DEVICE_VIRTIO_NET },
     { "pci-assign", virQEMUCapsObjectPropsPCIAssign,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign),
       -1 },
@@ -1865,7 +1865,7 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       -1 },
     { "vfio-pci", virQEMUCapsObjectPropsVfioPCI,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPCI),
-      -1 },
+      QEMU_CAPS_DEVICE_VFIO_PCI },
     { "scsi-disk", virQEMUCapsObjectPropsSCSIDisk,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIDisk),
       -1 },
@@ -1877,13 +1877,13 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       -1 },
     { "usb-redir", virQEMUCapsObjectPropsUSBRedir,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBRedir),
-      -1 },
+      QEMU_CAPS_USB_REDIR },
     { "usb-host", virQEMUCapsObjectPropsUSBHost,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBHost),
       -1 },
     { "scsi-generic", virQEMUCapsObjectPropsSCSIGeneric,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric),
-      -1 },
+      QEMU_CAPS_DEVICE_SCSI_GENERIC },
     { "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPCIHost,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPCIHost),
       -1 },
@@ -1892,25 +1892,25 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       -1 },
     { "usb-storage", virQEMUCapsObjectPropsUSBStorage,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBStorage),
-      -1 },
+      QEMU_CAPS_DEVICE_USB_STORAGE },
     { "kvm-pit", virQEMUCapsObjectPropsKVMPit,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsKVMPit),
       -1 },
     { "VGA", virQEMUCapsObjectPropsVGA,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVGA),
-      -1 },
+      QEMU_CAPS_DEVICE_VGA },
     { "vmware-svga", virQEMUCapsObjectPropsVmwareSvga,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVmwareSvga),
-      -1 },
+      QEMU_CAPS_DEVICE_VMWARE_SVGA },
     { "qxl", virQEMUCapsObjectPropsQxl,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsQxl),
-      -1 },
+      QEMU_CAPS_DEVICE_QXL },
     { "virtio-gpu-pci", virQEMUCapsObjectPropsVirtioGpu,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioGpu),
-      -1 },
+      QEMU_CAPS_DEVICE_VIRTIO_GPU },
     { "virtio-gpu-device", virQEMUCapsObjectPropsVirtioGpu,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioGpu),
-      -1 },
+      QEMU_CAPS_DEVICE_VIRTIO_GPU },
     { "ICH9-LPC", virQEMUCapsObjectPropsICH9,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsICH9),
       -1 },
@@ -1925,7 +1925,7 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
       -1 },
     { "nec-usb-xhci", virQEMUCapsObjectPropsUSBNECXHCI,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBNECXHCI),
-      -1 },
+      QEMU_CAPS_NEC_USB_XHCI },
     { "intel-iommu", virQEMUCapsObjectPropsIntelIOMMU,
       ARRAY_CARDINALITY(virQEMUCapsObjectPropsIntelIOMMU),
       QEMU_CAPS_DEVICE_INTEL_IOMMU },
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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