[PATCH v2 0/4] support for virtio packed virtqueues

QEMU recently (86044b24e) introduced packed virtqueues for virtio that supposedly have better cache utilization and performance compared to the default split queues. So here's a patch set that expose the virtio parameter as a optional libvirt XML attribute to virtio-backed devices, e.g.: <interface type='user'> <mac address='00:11:22:33:44:55'/> <model type='virtio'/> <driver packed='on'/> </interface> The default value if the attribute is omitted is still 'off' and regular split virtqueues are used. v1 -> v2: * rebased on current master * reworded documentation as suggested by Jason and Michael Bjoern Walk (4): qemu: capabilities: add 'packed' capability conf: domain: support for virtio packed option qemu: command: support for virtio packed option docs: documentation for virtio packed option docs/formatdomain.html.in | 10 ++++++ docs/schemas/domaincommon.rng | 5 +++ src/conf/domain_conf.c | 28 ++++++++++++++++ src/conf/domain_conf.h | 1 + src/qemu/qemu_capabilities.c | 6 ++++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 10 ++++++ .../caps_4.2.0.aarch64.xml | 1 + .../caps_4.2.0.x86_64.xml | 1 + .../caps_5.0.0.aarch64.xml | 1 + .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + .../caps_5.0.0.x86_64.xml | 1 + tests/qemuxml2argvdata/virtio-options.args | 32 ++++++++++--------- tests/qemuxml2argvdata/virtio-options.xml | 26 +++++++-------- tests/qemuxml2argvtest.c | 3 +- tests/qemuxml2xmltest.c | 3 +- 16 files changed, 100 insertions(+), 30 deletions(-) -- 2.24.1

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@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@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 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

On Mon, Apr 06, 2020 at 03:13 PM +0200, Bjoern Walk <bwalk@linux.ibm.com> wrote:
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@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@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 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
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>

Expose the virtio parameter for packed virtqueues as an optional libvirt XML attribute to virtio-backed devices, e.g.: <interface type='user'> <mac address='00:11:22:33:44:55'/> <model type='virtio'/> <driver packed='on'/> </interface> If the attribute is omitted, the default value for this attribute is 'off' and regular split virtqueues are used. Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 28 ++++++++++++++++++++++++++++ src/conf/domain_conf.h | 1 + 3 files changed, 34 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index dcf2e09d..12e842ce 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5961,6 +5961,11 @@ <ref name="virOnOff"/> </attribute> </optional> + <optional> + <attribute name="packed"> + <ref name="virOnOff"/> + </attribute> + </optional> </define> <define name="usbmaster"> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 460f8064..51fd5f15 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1513,6 +1513,16 @@ virDomainVirtioOptionsParseXML(xmlNodePtr driver, } res->ats = val; } + VIR_FREE(str); + + if ((str = virXMLPropString(driver, "packed"))) { + if ((val = virTristateSwitchTypeFromString(str)) <= 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("invalid packed value")); + return -1; + } + res->packed = val; + } return 0; } @@ -5092,6 +5102,12 @@ virDomainCheckVirtioOptions(virDomainVirtioOptionsPtr virtio) "for virtio devices")); return -1; } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("packed driver option is only supported " + "for virtio devices")); + return -1; + } return 0; } @@ -7378,6 +7394,10 @@ virDomainVirtioOptionsFormat(virBufferPtr buf, virBufferAsprintf(buf, " ats='%s'", virTristateSwitchTypeToString(virtio->ats)); } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(buf, " packed='%s'", + virTristateSwitchTypeToString(virtio->packed)); + } } @@ -22416,6 +22436,14 @@ virDomainVirtioOptionsCheckABIStability(virDomainVirtioOptionsPtr src, virTristateSwitchTypeToString(src->ats)); return false; } + if (src->packed != dst->packed) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target device packed option '%s' does not " + "match source '%s'"), + virTristateSwitchTypeToString(dst->packed), + virTristateSwitchTypeToString(src->packed)); + return false; + } return true; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2038b54c..22f6990e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2417,6 +2417,7 @@ struct _virDomainVsockDef { struct _virDomainVirtioOptions { virTristateSwitch iommu; virTristateSwitch ats; + virTristateSwitch packed; }; /* -- 2.24.1

On Mon, Apr 06, 2020 at 03:13 PM +0200, Bjoern Walk <bwalk@linux.ibm.com> wrote:
Expose the virtio parameter for packed virtqueues as an optional libvirt XML attribute to virtio-backed devices, e.g.:
<interface type='user'> <mac address='00:11:22:33:44:55'/> <model type='virtio'/> <driver packed='on'/> </interface>
If the attribute is omitted, the default value for this attribute is 'off' and regular split virtqueues are used.
Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 28 ++++++++++++++++++++++++++++ src/conf/domain_conf.h | 1 + 3 files changed, 34 insertions(+)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index dcf2e09d..12e842ce 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5961,6 +5961,11 @@ <ref name="virOnOff"/> </attribute> </optional> + <optional> + <attribute name="packed"> + <ref name="virOnOff"/> + </attribute> + </optional> </define>
<define name="usbmaster"> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 460f8064..51fd5f15 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1513,6 +1513,16 @@ virDomainVirtioOptionsParseXML(xmlNodePtr driver, } res->ats = val; } + VIR_FREE(str); + + if ((str = virXMLPropString(driver, "packed"))) { + if ((val = virTristateSwitchTypeFromString(str)) <= 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("invalid packed value")); + return -1; + } + res->packed = val; + }
return 0; } @@ -5092,6 +5102,12 @@ virDomainCheckVirtioOptions(virDomainVirtioOptionsPtr virtio) "for virtio devices")); return -1; } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("packed driver option is only supported " + "for virtio devices")); + return -1; + } return 0; }
@@ -7378,6 +7394,10 @@ virDomainVirtioOptionsFormat(virBufferPtr buf, virBufferAsprintf(buf, " ats='%s'", virTristateSwitchTypeToString(virtio->ats)); } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(buf, " packed='%s'", + virTristateSwitchTypeToString(virtio->packed)); + } }
@@ -22416,6 +22436,14 @@ virDomainVirtioOptionsCheckABIStability(virDomainVirtioOptionsPtr src, virTristateSwitchTypeToString(src->ats)); return false; } + if (src->packed != dst->packed) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target device packed option '%s' does not " + "match source '%s'"), + virTristateSwitchTypeToString(dst->packed), + virTristateSwitchTypeToString(src->packed)); + return false; + } return true; }
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2038b54c..22f6990e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2417,6 +2417,7 @@ struct _virDomainVsockDef { struct _virDomainVirtioOptions { virTristateSwitch iommu; virTristateSwitch ats; + virTristateSwitch packed; };
/* -- 2.24.1
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>

Pass the packed option on the QEMU command line of the capability for packed virtqueues is detected and the parameter is set explicitly. Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- src/qemu/qemu_command.c | 10 +++++++ tests/qemuxml2argvdata/virtio-options.args | 32 ++++++++++++---------- tests/qemuxml2argvdata/virtio-options.xml | 26 +++++++++--------- tests/qemuxml2argvtest.c | 3 +- tests/qemuxml2xmltest.c | 3 +- 5 files changed, 44 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index df90f5ed..da9450fe 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -614,6 +614,16 @@ qemuBuildVirtioOptionsStr(virBufferPtr buf, virBufferAsprintf(buf, ",ats=%s", virTristateSwitchTypeToString(virtio->ats)); } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PACKED_QUEUES)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("the packed setting is not supported with this " + "QEMU binary")); + return -1; + } + virBufferAsprintf(buf, ",packed=%s", + virTristateSwitchTypeToString(virtio->packed)); + } return 0; } diff --git a/tests/qemuxml2argvdata/virtio-options.args b/tests/qemuxml2argvdata/virtio-options.args index 33ecd8f4..8253a788 100644 --- a/tests/qemuxml2argvdata/virtio-options.args +++ b/tests/qemuxml2argvdata/virtio-options.args @@ -24,36 +24,38 @@ server,nowait \ -rtc base=utc \ -no-shutdown \ -no-acpi \ --device virtio-scsi-pci,iommu_platform=on,ats=on,id=scsi0,bus=pci.0,addr=0x8 \ --device virtio-serial-pci,id=virtio-serial0,iommu_platform=on,ats=on,bus=pci.0,\ -addr=0x9 \ +-device virtio-scsi-pci,iommu_platform=on,ats=on,packed=on,id=scsi0,bus=pci.0,\ +addr=0x8 \ +-device virtio-serial-pci,id=virtio-serial0,iommu_platform=on,ats=on,packed=on,\ +bus=pci.0,addr=0x9 \ -usb \ -drive file=/var/lib/libvirt/images/img1,format=raw,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-pci,iommu_platform=on,ats=on,bus=pci.0,addr=0xa,\ +-device virtio-blk-pci,iommu_platform=on,ats=on,packed=on,bus=pci.0,addr=0xa,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,iommu_platform=on,\ -ats=on,bus=pci.0,addr=0x3 \ +ats=on,packed=on,bus=pci.0,addr=0x3 \ -fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,\ path=/export/fs2 \ -device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=fs2,iommu_platform=on,\ -ats=on,bus=pci.0,addr=0x4 \ +ats=on,packed=on,bus=pci.0,addr=0x4 \ -netdev user,id=hostnet0 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:56:58:5a:5c,bus=pci.0,\ -addr=0x6,iommu_platform=on,ats=on \ --device virtio-mouse-pci,id=input0,bus=pci.0,addr=0xe,iommu_platform=on,ats=on \ +addr=0x6,iommu_platform=on,ats=on,packed=on \ +-device virtio-mouse-pci,id=input0,bus=pci.0,addr=0xe,iommu_platform=on,ats=on,\ +packed=on \ -device virtio-keyboard-pci,id=input1,bus=pci.0,addr=0x10,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -device virtio-tablet-pci,id=input2,bus=pci.0,addr=0x11,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -device virtio-input-host-pci,id=input3,evdev=/dev/input/event1234,bus=pci.0,\ -addr=0x12,iommu_platform=on,ats=on \ +addr=0x12,iommu_platform=on,ats=on,packed=on \ -chardev socket,id=chr-vu-video0,fd=1729 \ -device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\ -bus=pci.0,addr=0x2,iommu_platform=on,ats=on \ +bus=pci.0,addr=0x2,iommu_platform=on,ats=on,packed=on \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xc,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,iommu_platform=on,ats=on,bus=pci.0,\ -addr=0xd +-device virtio-rng-pci,rng=objrng0,id=rng0,iommu_platform=on,ats=on,packed=on,\ +bus=pci.0,addr=0xd diff --git a/tests/qemuxml2argvdata/virtio-options.xml b/tests/qemuxml2argvdata/virtio-options.xml index dd9a4f4a..3ca27840 100644 --- a/tests/qemuxml2argvdata/virtio-options.xml +++ b/tests/qemuxml2argvdata/virtio-options.xml @@ -15,7 +15,7 @@ <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw' iommu='on' ats='on'/> + <driver name='qemu' type='raw' iommu='on' ats='on' packed='on'/> <source file='/var/lib/libvirt/images/img1'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> @@ -27,22 +27,22 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='virtio-serial' index='0'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> <filesystem type='mount' accessmode='passthrough'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <source dir='/export/fs1'/> <target dir='fs1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='mapped'> - <driver type='path' wrpolicy='immediate' iommu='on' ats='on'/> + <driver type='path' wrpolicy='immediate' iommu='on' ats='on' packed='on'/> <source dir='/export/fs2'/> <target dir='fs2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> @@ -50,30 +50,30 @@ <interface type='user'> <mac address='52:54:56:58:5a:5c'/> <model type='virtio'/> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </interface> <input type='mouse' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </input> <input type='keyboard' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/> </input> <input type='tablet' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/> </input> <input type='passthrough' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <source evdev='/dev/input/event1234'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <video> - <driver iommu='on' ats='on' name='vhostuser'/> + <driver iommu='on' ats='on' packed='on' name='vhostuser'/> <model type='virtio' heads='1' primary='yes'> <acceleration accel3d='yes' rendernode='/dev/dri/test'/> </model> @@ -81,11 +81,11 @@ </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> </memballoon> <rng model='virtio'> <backend model='random'>/dev/random</backend> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> </rng> </devices> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fdeb3c2e..405227fd 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2989,7 +2989,8 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, - QEMU_CAPS_VIRTIO_PCI_ATS); + QEMU_CAPS_VIRTIO_PCI_ATS, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_KVM); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b4c83fcc..756d4e2c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1291,7 +1291,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, QEMU_CAPS_VIRTIO_PCI_ATS, - QEMU_CAPS_DEVICE_VHOST_USER_GPU); + QEMU_CAPS_DEVICE_VHOST_USER_GPU, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_KVM); -- 2.24.1

On Mon, Apr 06, 2020 at 03:13 PM +0200, Bjoern Walk <bwalk@linux.ibm.com> wrote:
Pass the packed option on the QEMU command line of the capability for packed virtqueues is detected and the parameter is set explicitly.
Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- src/qemu/qemu_command.c | 10 +++++++ tests/qemuxml2argvdata/virtio-options.args | 32 ++++++++++++---------- tests/qemuxml2argvdata/virtio-options.xml | 26 +++++++++--------- tests/qemuxml2argvtest.c | 3 +- tests/qemuxml2xmltest.c | 3 +- 5 files changed, 44 insertions(+), 30 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index df90f5ed..da9450fe 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -614,6 +614,16 @@ qemuBuildVirtioOptionsStr(virBufferPtr buf, virBufferAsprintf(buf, ",ats=%s", virTristateSwitchTypeToString(virtio->ats)); } + if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PACKED_QUEUES)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("the packed setting is not supported with this " + "QEMU binary")); + return -1; + } + virBufferAsprintf(buf, ",packed=%s", + virTristateSwitchTypeToString(virtio->packed)); + }
return 0; } diff --git a/tests/qemuxml2argvdata/virtio-options.args b/tests/qemuxml2argvdata/virtio-options.args index 33ecd8f4..8253a788 100644 --- a/tests/qemuxml2argvdata/virtio-options.args +++ b/tests/qemuxml2argvdata/virtio-options.args @@ -24,36 +24,38 @@ server,nowait \ -rtc base=utc \ -no-shutdown \ -no-acpi \ --device virtio-scsi-pci,iommu_platform=on,ats=on,id=scsi0,bus=pci.0,addr=0x8 \ --device virtio-serial-pci,id=virtio-serial0,iommu_platform=on,ats=on,bus=pci.0,\ -addr=0x9 \ +-device virtio-scsi-pci,iommu_platform=on,ats=on,packed=on,id=scsi0,bus=pci.0,\ +addr=0x8 \ +-device virtio-serial-pci,id=virtio-serial0,iommu_platform=on,ats=on,packed=on,\ +bus=pci.0,addr=0x9 \ -usb \ -drive file=/var/lib/libvirt/images/img1,format=raw,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-pci,iommu_platform=on,ats=on,bus=pci.0,addr=0xa,\ +-device virtio-blk-pci,iommu_platform=on,ats=on,packed=on,bus=pci.0,addr=0xa,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,iommu_platform=on,\ -ats=on,bus=pci.0,addr=0x3 \ +ats=on,packed=on,bus=pci.0,addr=0x3 \ -fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,\ path=/export/fs2 \ -device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=fs2,iommu_platform=on,\ -ats=on,bus=pci.0,addr=0x4 \ +ats=on,packed=on,bus=pci.0,addr=0x4 \ -netdev user,id=hostnet0 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:56:58:5a:5c,bus=pci.0,\ -addr=0x6,iommu_platform=on,ats=on \ --device virtio-mouse-pci,id=input0,bus=pci.0,addr=0xe,iommu_platform=on,ats=on \ +addr=0x6,iommu_platform=on,ats=on,packed=on \ +-device virtio-mouse-pci,id=input0,bus=pci.0,addr=0xe,iommu_platform=on,ats=on,\ +packed=on \ -device virtio-keyboard-pci,id=input1,bus=pci.0,addr=0x10,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -device virtio-tablet-pci,id=input2,bus=pci.0,addr=0x11,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -device virtio-input-host-pci,id=input3,evdev=/dev/input/event1234,bus=pci.0,\ -addr=0x12,iommu_platform=on,ats=on \ +addr=0x12,iommu_platform=on,ats=on,packed=on \ -chardev socket,id=chr-vu-video0,fd=1729 \ -device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\ -bus=pci.0,addr=0x2,iommu_platform=on,ats=on \ +bus=pci.0,addr=0x2,iommu_platform=on,ats=on,packed=on \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xc,iommu_platform=on,\ -ats=on \ +ats=on,packed=on \ -object rng-random,id=objrng0,filename=/dev/random \ --device virtio-rng-pci,rng=objrng0,id=rng0,iommu_platform=on,ats=on,bus=pci.0,\ -addr=0xd +-device virtio-rng-pci,rng=objrng0,id=rng0,iommu_platform=on,ats=on,packed=on,\ +bus=pci.0,addr=0xd diff --git a/tests/qemuxml2argvdata/virtio-options.xml b/tests/qemuxml2argvdata/virtio-options.xml index dd9a4f4a..3ca27840 100644 --- a/tests/qemuxml2argvdata/virtio-options.xml +++ b/tests/qemuxml2argvdata/virtio-options.xml @@ -15,7 +15,7 @@ <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> - <driver name='qemu' type='raw' iommu='on' ats='on'/> + <driver name='qemu' type='raw' iommu='on' ats='on' packed='on'/> <source file='/var/lib/libvirt/images/img1'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> @@ -27,22 +27,22 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='virtio-serial' index='0'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> <filesystem type='mount' accessmode='passthrough'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <source dir='/export/fs1'/> <target dir='fs1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='mapped'> - <driver type='path' wrpolicy='immediate' iommu='on' ats='on'/> + <driver type='path' wrpolicy='immediate' iommu='on' ats='on' packed='on'/> <source dir='/export/fs2'/> <target dir='fs2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> @@ -50,30 +50,30 @@ <interface type='user'> <mac address='52:54:56:58:5a:5c'/> <model type='virtio'/> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </interface> <input type='mouse' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </input> <input type='keyboard' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/> </input> <input type='tablet' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/> </input> <input type='passthrough' bus='virtio'> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <source evdev='/dev/input/event1234'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <video> - <driver iommu='on' ats='on' name='vhostuser'/> + <driver iommu='on' ats='on' packed='on' name='vhostuser'/> <model type='virtio' heads='1' primary='yes'> <acceleration accel3d='yes' rendernode='/dev/dri/test'/> </model> @@ -81,11 +81,11 @@ </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> </memballoon> <rng model='virtio'> <backend model='random'>/dev/random</backend> - <driver iommu='on' ats='on'/> + <driver iommu='on' ats='on' packed='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> </rng> </devices> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fdeb3c2e..405227fd 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2989,7 +2989,8 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, - QEMU_CAPS_VIRTIO_PCI_ATS); + QEMU_CAPS_VIRTIO_PCI_ATS, + QEMU_CAPS_VIRTIO_PACKED_QUEUES);
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_KVM); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b4c83fcc..756d4e2c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1291,7 +1291,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, QEMU_CAPS_VIRTIO_PCI_ATS, - QEMU_CAPS_DEVICE_VHOST_USER_GPU); + QEMU_CAPS_DEVICE_VHOST_USER_GPU, + QEMU_CAPS_VIRTIO_PACKED_QUEUES);
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_KVM); -- 2.24.1
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>

Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- docs/formatdomain.html.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index fbffb168..f0252a34 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4372,6 +4372,16 @@ Possible values are <code>on</code> or <code>off</code>. <span class="since">Since 3.5.0</span> </p> + <p> + The attribute <code>packed</code> controls if QEMU should try to use + packed virtqueues. Compared to regular split queues, packed queues + consist of only a single descriptor ring replacing available and used + ring, index and descriptor buffer. This can result in better cache + utilization and performance. If packed virtqueues are actually used + depends on the feature negotiation between QEMU, vhost backends and guest + drivers. Possible values are <code>on</code> or <code>off</code>. + <span class="since">Since 6.3.0 (QEMU and KVM only)</span> + </p> <h4><a id="elementsVirtioTransitional">Virtio transitional devices</a></h4> -- 2.24.1

On a Monday in 2020, Bjoern Walk wrote:
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- docs/formatdomain.html.in | 10 ++++++++++ 1 file changed, 10 insertions(+)
Reviewed-by: Ján Tomko <jtomko@redhat.com> and pushed Jano

Ján Tomko <jtomko@redhat.com> [2020-04-08, 04:28PM +0200]:
On a Monday in 2020, Bjoern Walk wrote:
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> --- docs/formatdomain.html.in | 10 ++++++++++ 1 file changed, 10 insertions(+)
Reviewed-by: Ján Tomko <jtomko@redhat.com> and pushed
And thanks again!
Jano
participants (3)
-
Bjoern Walk
-
Ján Tomko
-
Marc Hartmayer