[PATCH v2 1/4] qemu: capabilities: add 'packed' capability

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

 



Add the capability for QEMU's packed virtqueues for virtio that supposedly have
better cache utilization and performance compared to the default split queues.

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx>
---
 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 994f1fd1..ae1aefec 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -571,6 +571,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
               /* 360 */
               "fsdev.multidevs",
+              "virtio.packed",
     );
 
 
@@ -1295,6 +1296,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[] = {
@@ -1309,6 +1311,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBlk[] = {
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
     { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
     { "werror", QEMU_CAPS_STORAGE_WERROR },
+    { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioNet[] = {
@@ -1321,6 +1324,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[] = {
@@ -1332,6 +1336,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[] = {
@@ -1401,6 +1406,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 d247e197..47767938 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -552,6 +552,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 360 */
     QEMU_CAPS_FSDEV_MULTIDEVS, /* fsdev.multidevs */
+    QEMU_CAPS_VIRTIO_PACKED_QUEUES, /* virtio.packed */
 
     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 eac189c4..e994aa79 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -181,6 +181,7 @@
   <flag name='vhost-user-fs'/>
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
+  <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 ad904d86..a1994603 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -225,6 +225,7 @@
   <flag name='vhost-user-fs'/>
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
+  <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 30664c62..3876d08c 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -183,6 +183,7 @@
   <flag name='vhost-user-fs'/>
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
+  <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 a6800482..b0891613 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -191,6 +191,7 @@
   <flag name='blockdev-snapshot.allow-write-only-overlay'/>
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
+  <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 df3557d1..b73c4efd 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -228,6 +228,7 @@
   <flag name='blockdev-snapshot.allow-write-only-overlay'/>
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
+  <flag name='virtio.packed'/>
   <version>4002091</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100241</microcodeVersion>
-- 
2.24.1






[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