Add a single QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL that will be set if any of the following qemu devices are found: virtio-blk-pci-transitional virtio-blk-pci-non-transitional virtio-net-pci-transitional virtio-net-pci-non-transitional vhost-scsi-pci-transitional vhost-scsi-pci-non-transitional virtio-rng-pci-transitional virtio-rng-pci-non-transitional virtio-9p-pci-transitional virtio-9p-pci-non-transitional virtio-balloon-pci-transitional virtio-balloon-pci-non-transitional vhost-vsock-pci-transitional vhost-vsock-pci-non-transitional virtio-input-host-pci-transitional virtio-input-host-pci-non-transitional virtio-scsi-pci-transitional virtio-scsi-pci-non-transitional virtio-serial-pci-transitional virtio-serial-pci-non-transitional Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 21 +++++++++++++++++++ src/qemu/qemu_capabilities.h | 1 + .../caps_4.0.0.riscv32.xml | 1 + .../caps_4.0.0.riscv64.xml | 1 + .../caps_4.0.0.x86_64.xml | 1 + 5 files changed, 25 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f035e68251..8e42c1c51c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -525,6 +525,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "memory-backend-file.pmem", "nvdimm.unarmed", "scsi-disk.device_id", + "virtio-pci-non-transitional", ); @@ -1102,6 +1103,26 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "vfio-ap", QEMU_CAPS_DEVICE_VFIO_AP }, { "zpci", QEMU_CAPS_DEVICE_ZPCI }, { "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD }, + { "virtio-blk-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-blk-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-net-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-net-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-rng-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-rng-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-9p-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-9p-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-balloon-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-balloon-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-vsock-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-vsock-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-input-host-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-input-host-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-serial-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-serial-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ba84052bca..c5e985d6b5 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -505,6 +505,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */ QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */ + QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL, /* virtio *-pci-{non-}transitional devices */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml index 3d958db461..20b91663bc 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -161,6 +161,7 @@ <flag name='egl-headless.rendernode'/> <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> + <flag name='virtio-pci-non-transitional'/> <version>3001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml index 40083843f2..7f37a3709c 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -161,6 +161,7 @@ <flag name='egl-headless.rendernode'/> <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> + <flag name='virtio-pci-non-transitional'/> <version>3001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index 109b1ff753..08f604385f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -206,6 +206,7 @@ <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='scsi-disk.device_id'/> + <flag name='virtio-pci-non-transitional'/> <version>3001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100758</microcodeVersion> -- 2.20.1