Add the capability for QEMU's packed virtqueues for virtio that supposedly have
better cache utilization and performance compared to the default split queues.
Signed-off-by: Bjoern Walk <bwalk(a)linux.ibm.com>
---
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
7 files changed, 12 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a95a60c3..3bc876d7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -567,6 +567,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"query-named-block-nodes.flat",
"blockdev-snapshot.allow-write-only-overlay",
"blockdev-reopen",
+ "virtio.packed",
);
@@ -1291,6 +1292,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsVirtioBalloon[] = {
{ "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY },
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
+ { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBlk[] = {
@@ -1304,6 +1306,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsVirtioBlk[] = {
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
+ { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioNet[] = {
@@ -1316,6 +1319,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsVirtioNet[] = {
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
{ "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER },
+ { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSpaprPCIHostBridge[] = {
@@ -1327,6 +1331,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsVirtioSCSI[] = {
{ "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY },
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
+ { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVfioPCI[] = {
@@ -1395,6 +1400,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsVirtioGpu[] = {
{ "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY },
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
+ { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsICH9[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f0961e27..21c09974 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -548,6 +548,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT, /* query-named-block-nodes supports the
'flat' option */
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the
'allow-write-only-overlay' feature */
QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is supported */
+ QEMU_CAPS_VIRTIO_PACKED_QUEUES, /* virtio packed virtqueue support */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 640ce29c..f1b7fbbe 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -179,6 +179,7 @@
<flag name='rng-builtin'/>
<flag name='virtio-net.failover'/>
<flag name='vhost-user-fs'/>
+ <flag name='virtio.packed'/>
<version>4001050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 83e804ea..15388967 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -223,6 +223,7 @@
<flag name='rng-builtin'/>
<flag name='virtio-net.failover'/>
<flag name='vhost-user-fs'/>
+ <flag name='virtio.packed'/>
<version>4002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index e52c6060..9ef8564a 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -181,6 +181,7 @@
<flag name='virtio-net.failover'/>
<flag name='cpu.kvm-no-adjvtime'/>
<flag name='vhost-user-fs'/>
+ <flag name='virtio.packed'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index 85fdb21c..a2d78ac0 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -189,6 +189,7 @@
<flag name='vhost-user-fs'/>
<flag name='query-named-block-nodes.flat'/>
<flag name='blockdev-snapshot.allow-write-only-overlay'/>
+ <flag name='virtio.packed'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index d773f7e3..b6a6b3be 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -226,6 +226,7 @@
<flag name='vhost-user-fs'/>
<flag name='query-named-block-nodes.flat'/>
<flag name='blockdev-snapshot.allow-write-only-overlay'/>
+ <flag name='virtio.packed'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100241</microcodeVersion>
--
2.24.1