Check whether the disable-legacy property is present on the following
devices:
virtio-balloon-pci
virtio-blk-pci
virtio-scsi-pci
virtio-net-pci
virtio-gpu-pci
Assuming that if QEMU knows other virtio devices where this property
is applicable, it will have at least one of these devices.
Added in QEMU by:
commit e266d421490e0ae83044bbebb209b2d3650c0ba6
virtio-pci: add flags to enable/disable legacy/modern
---
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
9 files changed, 14 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 43e3ea7..6c9af98 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -340,6 +340,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"display", /* 230 */
"intel-iommu",
"smm",
+ "virtio-disable-legacy",
);
@@ -1565,6 +1566,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
{ "deflate-on-oom", QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE },
+ { "disable-legacy", QEMU_CAPS_VIRTIO_DISABLE_LEGACY },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
@@ -1574,15 +1576,18 @@ static struct virQEMUCapsStringFlags
virQEMUCapsObjectPropsVirtioBlk[] = {
{ "event_idx", QEMU_CAPS_VIRTIO_BLK_EVENT_IDX },
{ "scsi", QEMU_CAPS_VIRTIO_BLK_SCSI },
{ "logical_block_size", QEMU_CAPS_BLOCKIO },
+ { "disable-legacy", QEMU_CAPS_VIRTIO_DISABLE_LEGACY },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioNet[] = {
{ "tx", QEMU_CAPS_VIRTIO_TX_ALG },
{ "event_idx", QEMU_CAPS_VIRTIO_NET_EVENT_IDX },
+ { "disable-legacy", QEMU_CAPS_VIRTIO_DISABLE_LEGACY },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioSCSI[] = {
{ "iothread", QEMU_CAPS_VIRTIO_SCSI_IOTHREAD },
+ { "disable-legacy", QEMU_CAPS_VIRTIO_DISABLE_LEGACY },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPCIAssign[] = {
@@ -1659,6 +1664,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQxlVga[]
= {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioGpu[] = {
{ "virgl", QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL },
+ { "disable-legacy", QEMU_CAPS_VIRTIO_DISABLE_LEGACY },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsICH9[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index d249e2e..11d2202 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -373,6 +373,7 @@ typedef enum {
QEMU_CAPS_DISPLAY, /* -display */
QEMU_CAPS_DEVICE_INTEL_IOMMU, /* -device intel-iommu */
QEMU_CAPS_MACHINE_SMM_OPT, /* -machine xxx,smm=on/off/auto */
+ QEMU_CAPS_VIRTIO_DISABLE_LEGACY, /* virtio-*pci.disable-legacy */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index 339ee1f..d990879 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -184,6 +184,7 @@
<flag name='display'/>
<flag name='intel-iommu'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index c1a68d0..61e04a7 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -189,6 +189,7 @@
<flag name='display'/>
<flag name='intel-iommu'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
index 85d7d3f..697082a 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
@@ -158,6 +158,7 @@
<flag name='tls-creds-x509'/>
<flag name='display'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
index deb1257..96b0af9 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
@@ -158,6 +158,7 @@
<flag name='tls-creds-x509'/>
<flag name='display'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
index 2b7ea0e..f590967 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
@@ -152,6 +152,7 @@
<flag name='tls-creds-x509'/>
<flag name='display'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 495c114..ed75438 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -195,6 +195,7 @@
<flag name='display'/>
<flag name='intel-iommu'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index fafffa6..70e1637 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -192,6 +192,7 @@
<flag name='display'/>
<flag name='intel-iommu'/>
<flag name='smm'/>
+ <flag name='virtio-disable-legacy'/>
<version>2006091</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0-rc1-52-g42e0d60)</package>
--
2.7.3