Re: [libvirt] [PATCH 5/9] qemu: allow conditional device property probing

2017-03-28 Thread John Ferlan


On 03/23/2017 11:26 AM, Ján Tomko wrote:
> Do not probe for devices that QEMU does not know
> when probing for device options.

No bz reference here

> ---
>  src/qemu/qemu_capabilities.c | 99 
> ++--
>  1 file changed, 68 insertions(+), 31 deletions(-)
> 

ACK

John

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


[libvirt] [PATCH 5/9] qemu: allow conditional device property probing

2017-03-23 Thread Ján Tomko
Do not probe for devices that QEMU does not know
when probing for device options.
---
 src/qemu/qemu_capabilities.c | 99 ++--
 1 file changed, 68 insertions(+), 31 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 05d0a91..278badf 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1742,71 +1742,103 @@ struct virQEMUCapsObjectTypeProps {
 const char *type;
 struct virQEMUCapsStringFlags *props;
 size_t nprops;
+int capsCondition;
 };
 
 static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
 { "virtio-blk-pci", virQEMUCapsObjectPropsVirtioBlk,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk),
+  -1 },
 { "virtio-net-pci", virQEMUCapsObjectPropsVirtioNet,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
+  -1 },
 { "virtio-scsi-pci", virQEMUCapsObjectPropsVirtioSCSI,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI),
+  -1 },
 { "virtio-blk-ccw", virQEMUCapsObjectPropsVirtioBlk,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk),
+  -1 },
 { "virtio-net-ccw", virQEMUCapsObjectPropsVirtioNet,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
+  -1 },
 { "virtio-scsi-ccw", virQEMUCapsObjectPropsVirtioSCSI,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioSCSI),
+  -1 },
 { "virtio-blk-s390", virQEMUCapsObjectPropsVirtioBlk,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioBlk),
+  -1 },
 { "virtio-net-s390", virQEMUCapsObjectPropsVirtioNet,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioNet),
+  -1 },
 { "pci-assign", virQEMUCapsObjectPropsPCIAssign,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign),
+  -1 },
 { "kvm-pci-assign", virQEMUCapsObjectPropsPCIAssign,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPCIAssign),
+  -1 },
 { "vfio-pci", virQEMUCapsObjectPropsVfioPCI,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPCI) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPCI),
+  -1 },
 { "scsi-disk", virQEMUCapsObjectPropsSCSIDisk,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIDisk) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIDisk),
+  -1 },
 { "ide-drive", virQEMUCapsObjectPropsIDEDrive,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsIDEDrive) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsIDEDrive),
+  -1 },
 { "PIIX4_PM", virQEMUCapsObjectPropsPiix4PM,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPiix4PM) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsPiix4PM),
+  -1 },
 { "usb-redir", virQEMUCapsObjectPropsUSBRedir,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBRedir) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBRedir),
+  -1 },
 { "usb-host", virQEMUCapsObjectPropsUSBHost,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBHost) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBHost),
+  -1 },
 { "scsi-generic", virQEMUCapsObjectPropsSCSIGeneric,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric),
+  -1 },
 { "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPCIHost,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPCIHost) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPCIHost),
+  -1 },
 { "q35-pcihost", virQEMUCapsObjectPropsQ35PCIHost,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsQ35PCIHost) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsQ35PCIHost),
+  -1 },
 { "usb-storage", virQEMUCapsObjectPropsUSBStorage,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBStorage) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBStorage),
+  -1 },
 { "kvm-pit", virQEMUCapsObjectPropsKVMPit,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsKVMPit) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsKVMPit),
+  -1 },
 { "VGA", virQEMUCapsObjectPropsVGA,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVGA) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVGA),
+  -1 },
 { "vmware-svga", virQEMUCapsObjectPropsVmwareSvga,
-  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVmwareSvga) },
+  ARRAY_CARDINALITY(virQEMUCapsObjectPropsVmwareSvga),
+  -1 },
 { "qxl", virQEMUCapsObjectPropsQxl,
-  AR