From f016a8e3227acc0a1cb5bd126fa50f8b11f31ed2 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Fri, 14 Aug 2026 15:20:44 +0200 Subject: [PATCH] libvirt-12.5.0-2.el10 - tools: virsh: fix crash on error (RHEL-234911) - conf: Include check for pci_bus in virDomainIOMMUDefEquals() (RHEL-138901) - qemu: introduce QEMU_CAPS_DEVICE_ARM_SMMUV3 (RHEL-138901) - qemu: introduce QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS (RHEL-138901) - qemu: introduce QEMU_CAPS_ARM_SMMUV3_ACCEL (RHEL-138901) - qemu: Add support for HW-accelerated nested SMMUv3 (RHEL-138901) - tests: qemuxmlconfdata: provide HW-accel smmuv3 sample XML and CLI args (RHEL-138901) - conf: schemas: Allow '.' in schema for CPU flag name (RHEL-222549) - tests: capabilityschemadata: Add a real test example (RHEL-222549) - util: virFileChownFiles: do not follow symlinks (CVE-2026-63622) Resolves: RHEL-138901, RHEL-222549, RHEL-234911, RHEL-235931 --- ...r-pci_bus-in-virDomainIOMMUDefEquals.patch | 33 + ...-Allow-.-in-schema-for-CPU-flag-name.patch | 38 + ...ort-for-HW-accelerated-nested-SMMUv3.patch | 371 +++ ...introduce-QEMU_CAPS_ARM_SMMUV3_ACCEL.patch | 81 + ...ce-QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS.patch | 2225 +++++++++++++++++ ...ntroduce-QEMU_CAPS_DEVICE_ARM_SMMUV3.patch | 152 ++ ...tyschemadata-Add-a-real-test-example.patch | 1063 ++++++++ ...accel-smmuv3-sample-XML-and-CLI-args.patch | 395 +++ libvirt-tools-virsh-fix-crash-on-error.patch | 50 + ...ileChownFiles-do-not-follow-symlinks.patch | 71 + libvirt.spec | 28 +- 11 files changed, 4506 insertions(+), 1 deletion(-) create mode 100644 libvirt-conf-Include-check-for-pci_bus-in-virDomainIOMMUDefEquals.patch create mode 100644 libvirt-conf-schemas-Allow-.-in-schema-for-CPU-flag-name.patch create mode 100644 libvirt-qemu-Add-support-for-HW-accelerated-nested-SMMUv3.patch create mode 100644 libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_ACCEL.patch create mode 100644 libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS.patch create mode 100644 libvirt-qemu-introduce-QEMU_CAPS_DEVICE_ARM_SMMUV3.patch create mode 100644 libvirt-tests-capabilityschemadata-Add-a-real-test-example.patch create mode 100644 libvirt-tests-qemuxmlconfdata-provide-HW-accel-smmuv3-sample-XML-and-CLI-args.patch create mode 100644 libvirt-tools-virsh-fix-crash-on-error.patch create mode 100644 libvirt-util-virFileChownFiles-do-not-follow-symlinks.patch diff --git a/libvirt-conf-Include-check-for-pci_bus-in-virDomainIOMMUDefEquals.patch b/libvirt-conf-Include-check-for-pci_bus-in-virDomainIOMMUDefEquals.patch new file mode 100644 index 0000000..cabb2ac --- /dev/null +++ b/libvirt-conf-Include-check-for-pci_bus-in-virDomainIOMMUDefEquals.patch @@ -0,0 +1,33 @@ +From 1191669a769e280a77107804c6cdbab08e972a1e Mon Sep 17 00:00:00 2001 +Message-ID: <1191669a769e280a77107804c6cdbab08e972a1e.1786713643.git.jdenemar@redhat.com> +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:12:55 -0700 +Subject: [PATCH] conf: Include check for pci_bus in virDomainIOMMUDefEquals() + +virDomainIOMMUDefEquals() should check for pci_bus being equal +across two virDomainIOMMUDef being compared. + +Fixes: 4d6419b286af ("qemu: Implement pluggable-device smmuv3") +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit b2bfc6b4c8b7243840750e1e95514a8646482cd4) + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + src/conf/domain_conf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c +index 17c4a57cd8..94cfb27c1d 100644 +--- a/src/conf/domain_conf.c ++++ b/src/conf/domain_conf.c +@@ -16849,6 +16849,7 @@ virDomainIOMMUDefEquals(const virDomainIOMMUDef *a, + a->iotlb != b->iotlb || + a->aw_bits != b->aw_bits || + a->dma_translation != b->dma_translation || ++ a->pci_bus != b->pci_bus || + a->xtsup != b->xtsup || + a->pt != b->pt || + a->granule != b->granule) +-- +2.55.0 diff --git a/libvirt-conf-schemas-Allow-.-in-schema-for-CPU-flag-name.patch b/libvirt-conf-schemas-Allow-.-in-schema-for-CPU-flag-name.patch new file mode 100644 index 0000000..deb0d6f --- /dev/null +++ b/libvirt-conf-schemas-Allow-.-in-schema-for-CPU-flag-name.patch @@ -0,0 +1,38 @@ +From 9cf23fdd0cf7d5b39a1f51cfc61826b4da431db2 Mon Sep 17 00:00:00 2001 +Message-ID: <9cf23fdd0cf7d5b39a1f51cfc61826b4da431db2.1786713644.git.jdenemar@redhat.com> +From: Peter Krempa +Date: Mon, 3 Aug 2026 14:53:25 +0200 +Subject: [PATCH] conf: schemas: Allow '.' in schema for CPU flag name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow '.' so that CPU features such as: + + + +pass schema validation. + +Signed-off-by: Peter Krempa +Reviewed-by: Ján Tomko +(cherry picked from commit 5225c1cb688170bb2748f2f23455da4a7cb8a1bf) +https://redhat.atlassian.net/browse/RHEL-222549 +--- + src/conf/schemas/cputypes.rng | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/conf/schemas/cputypes.rng b/src/conf/schemas/cputypes.rng +index 8edf1d14e3..eef3807f1a 100644 +--- a/src/conf/schemas/cputypes.rng ++++ b/src/conf/schemas/cputypes.rng +@@ -406,7 +406,7 @@ + + + +- [a-zA-Z0-9\-_]+ ++ [a-zA-Z0-9\-_.]+ + + + +-- +2.55.0 diff --git a/libvirt-qemu-Add-support-for-HW-accelerated-nested-SMMUv3.patch b/libvirt-qemu-Add-support-for-HW-accelerated-nested-SMMUv3.patch new file mode 100644 index 0000000..7f8ddc8 --- /dev/null +++ b/libvirt-qemu-Add-support-for-HW-accelerated-nested-SMMUv3.patch @@ -0,0 +1,371 @@ +From 311945c34f1188283be6c71b5c2ddd9e967977ff Mon Sep 17 00:00:00 2001 +Message-ID: <311945c34f1188283be6c71b5c2ddd9e967977ff.1786713644.git.jdenemar@redhat.com> +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:13:00 -0700 +Subject: [PATCH] qemu: Add support for HW-accelerated nested SMMUv3 + +Add support for enabling HW-accelerated nested SMMUv3 via +attribute and its additional attributes for ATS, SSID, RIL, and OAS +configuration. + +Validate the domain iommu accel attribute in qemu_validate.c when +QEMU lacks this capability. Checking accel is sufficient because ats, +ril, ssidsize, and oas were introduced in the same QEMU release, and +it only makes sense to backport accel, ats, ril, ssidsize, and oas +all together. + +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit d4605d8279d73bf8d2b8031d49f453529738ef34) + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + docs/formatdomain.rst | 38 +++++++++++++++ + src/conf/domain_conf.c | 79 +++++++++++++++++++++++++++++++ + src/conf/domain_conf.h | 5 ++ + src/conf/domain_validate.c | 27 ++++++++++- + src/conf/schemas/domaincommon.rng | 25 ++++++++++ + src/qemu/qemu_command.c | 15 ++++++ + src/qemu/qemu_validate.c | 12 +++++ + 7 files changed, 200 insertions(+), 1 deletion(-) + +diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst +index a861f9f177..1e8c81c3a5 100644 +--- a/docs/formatdomain.rst ++++ b/docs/formatdomain.rst +@@ -9426,6 +9426,44 @@ Examples: + The ``pciBus`` attribute notes the index of the controller that an + IOMMU device is attached to. (QEMU/KVM and ``smmuv3`` model only) + ++ ``accel`` ++ The ``accel`` attribute with possible values ``on`` and ``off`` can ++ be used to enable hardware acceleration support for smmuv3 IOMMU ++ devices. ++ :since:`Since 12.7.0` (QEMU/KVM and ``smmuv3`` model only) ++ ++ ``ats`` ++ The ``ats`` attribute with possible values ``on`` and ``off`` can be ++ used to enable reporting Address Translation Services capability to ++ the guest for smmuv3 IOMMU devices with ``accel`` set to ``on``, if ++ the host SMMUv3 supports ATS and the associated passthrough device ++ supports ATS. If ``accel`` is enabled and ``ats`` is not configured, ++ the hypervisor default value is used. ++ :since:`Since 12.7.0` (QEMU/KVM and ``smmuv3`` model only) ++ ++ ``ril`` ++ The ``ril`` attribute with possible values ``on`` and ``off`` can be ++ used to report whether Range Invalidation for IOMMU devices with ++ ``accel`` set to ``on`` is compatible with host SMMUv3 support. If ++ ``accel`` is enabled and ``ril`` is not configured, the hypervisor ++ default value is used. ++ :since:`Since 12.7.0` (QEMU/KVM and ``smmuv3`` model only) ++ ++ ``ssidsize`` ++ The ``ssidsize`` attribute sets the number of bits used to ++ represent SubstreamIDs. A value of N allows SSIDs in the range ++ [0 .. 2^N - 1]. The valid range is 0-20, and a value greater than 0 ++ is required for enabling PASID support, as doing so advertises PASID ++ capability to the vIOMMU. If ``accel`` is enabled and ``ssidsize`` is ++ not configured, the hypervisor default value is used. ++ :since:`Since 12.7.0` (QEMU/KVM and ``smmuv3`` model only) ++ ++ ``oas`` ++ The ``oas`` attribute sets the output address size in units of bits. ++ If ``accel`` is enabled and ``oas`` is not configured, the hypervisor ++ default value is used. ++ :since:`Since 12.7.0` (QEMU/KVM and ``smmuv3`` model only) ++ + In case of ``virtio`` IOMMU device, the ``driver`` element can optionally + contain ``granule`` subelement that allows to choose which granule will be + used by default. It is useful when running guests with different page size +diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c +index 94cfb27c1d..db44ba9a72 100644 +--- a/src/conf/domain_conf.c ++++ b/src/conf/domain_conf.c +@@ -2863,6 +2863,10 @@ virDomainIOMMUDefNew(void) + + iommu->pci_bus = -1; + ++ iommu->ssid_size = -1; ++ ++ iommu->oas = -1; ++ + return g_steal_pointer(&iommu); + } + +@@ -14746,6 +14750,26 @@ virDomainIOMMUDefParseXML(virDomainXMLOption *xmlopt, + &iommu->pci_bus, -1) < 0) + return NULL; + ++ if (virXMLPropTristateSwitch(driver, "accel", VIR_XML_PROP_NONE, ++ &iommu->accel) < 0) ++ return NULL; ++ ++ if (virXMLPropTristateSwitch(driver, "ats", VIR_XML_PROP_NONE, ++ &iommu->ats) < 0) ++ return NULL; ++ ++ if (virXMLPropTristateSwitch(driver, "ril", VIR_XML_PROP_NONE, ++ &iommu->ril) < 0) ++ return NULL; ++ ++ if (virXMLPropInt(driver, "ssidsize", 10, VIR_XML_PROP_NONE, ++ &iommu->ssid_size, -1) < 0) ++ return NULL; ++ ++ if (virXMLPropInt(driver, "oas", 10, VIR_XML_PROP_NONE, ++ &iommu->oas, -1) < 0) ++ return NULL; ++ + if ((granule = virXPathNode("./driver/granule", ctxt))) { + g_autofree char *mode = virXMLPropString(granule, "mode"); + unsigned long long size; +@@ -16850,6 +16874,11 @@ virDomainIOMMUDefEquals(const virDomainIOMMUDef *a, + a->aw_bits != b->aw_bits || + a->dma_translation != b->dma_translation || + a->pci_bus != b->pci_bus || ++ a->accel != b->accel || ++ a->ats != b->ats || ++ a->ril != b->ril || ++ a->ssid_size != b->ssid_size || ++ a->oas != b->oas || + a->xtsup != b->xtsup || + a->pt != b->pt || + a->granule != b->granule) +@@ -22734,6 +22763,36 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMUDef *src, + dst->pci_bus, src->pci_bus); + return false; + } ++ if (src->accel != dst->accel) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Target domain IOMMU device accel value '%1$d' does not match source '%2$d'"), ++ dst->accel, src->accel); ++ return false; ++ } ++ if (src->ats != dst->ats) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Target domain IOMMU device ATS value '%1$d' does not match source '%2$d'"), ++ dst->ats, src->ats); ++ return false; ++ } ++ if (src->ril != dst->ril) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Target domain IOMMU device ril value '%1$d' does not match source '%2$d'"), ++ dst->ril, src->ril); ++ return false; ++ } ++ if (src->ssid_size != dst->ssid_size) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Target domain IOMMU device ssid_size value '%1$d' does not match source '%2$d'"), ++ dst->ssid_size, src->ssid_size); ++ return false; ++ } ++ if (src->oas != dst->oas) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("Target domain IOMMU device oas value '%1$d' does not match source '%2$d'"), ++ dst->oas, src->oas); ++ return false; ++ } + if (src->dma_translation != dst->dma_translation) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target domain IOMMU device dma translation '%1$s' does not match source '%2$s'"), +@@ -29204,6 +29263,26 @@ virDomainIOMMUDefFormat(virBuffer *buf, + virBufferAsprintf(&driverAttrBuf, " pciBus='%d'", + iommu->pci_bus); + } ++ if (iommu->accel != VIR_TRISTATE_SWITCH_ABSENT) { ++ virBufferAsprintf(&driverAttrBuf, " accel='%s'", ++ virTristateSwitchTypeToString(iommu->accel)); ++ } ++ if (iommu->ats != VIR_TRISTATE_SWITCH_ABSENT) { ++ virBufferAsprintf(&driverAttrBuf, " ats='%s'", ++ virTristateSwitchTypeToString(iommu->ats)); ++ } ++ if (iommu->ril != VIR_TRISTATE_SWITCH_ABSENT) { ++ virBufferAsprintf(&driverAttrBuf, " ril='%s'", ++ virTristateSwitchTypeToString(iommu->ril)); ++ } ++ if (iommu->ssid_size >= 0) { ++ virBufferAsprintf(&driverAttrBuf, " ssidsize='%d'", ++ iommu->ssid_size); ++ } ++ if (iommu->oas >= 0) { ++ virBufferAsprintf(&driverAttrBuf, " oas='%d'", ++ iommu->oas); ++ } + if (iommu->granule != 0) { + if (iommu->granule == -1) { + virBufferAddLit(&driverChildBuf, "\n"); +diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h +index 0c6c79c413..40ea6090f8 100644 +--- a/src/conf/domain_conf.h ++++ b/src/conf/domain_conf.h +@@ -3105,6 +3105,11 @@ struct _virDomainIOMMUDef { + virTristateSwitch xtsup; + virTristateSwitch pt; + int granule; /* -1 means 'host', 0 unset, page size in KiB otherwise */ ++ virTristateSwitch accel; ++ virTristateSwitch ats; ++ virTristateSwitch ril; ++ int ssid_size; ++ int oas; + }; + + typedef enum { +diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c +index 3946f92182..710a891904 100644 +--- a/src/conf/domain_validate.c ++++ b/src/conf/domain_validate.c +@@ -3203,6 +3203,16 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } ++ if (iommu->accel != VIR_TRISTATE_SWITCH_ON && ++ (iommu->ats != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ril != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ssid_size >= 0 || ++ iommu->oas >= 0)) { ++ virReportError(VIR_ERR_XML_ERROR, ++ _("accel must be enabled for iommu model '%1$s' when setting ats, ril, ssidsize, or oas"), ++ virDomainIOMMUModelTypeToString(iommu->model)); ++ return -1; ++ } + break; + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT || +@@ -3210,7 +3220,12 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) + iommu->eim != VIR_TRISTATE_SWITCH_ABSENT || + iommu->iotlb != VIR_TRISTATE_SWITCH_ABSENT || + iommu->dma_translation != VIR_TRISTATE_SWITCH_ABSENT || +- iommu->pci_bus >= 0) { ++ iommu->pci_bus >= 0 || ++ iommu->accel != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ats != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ril != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ssid_size >= 0 || ++ iommu->oas >= 0) { + virReportError(VIR_ERR_XML_ERROR, + _("iommu model '%1$s' doesn't support some additional attributes"), + virDomainIOMMUModelTypeToString(iommu->model)); +@@ -3233,6 +3248,11 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) + iommu->aw_bits != 0 || + iommu->dma_translation != VIR_TRISTATE_SWITCH_ABSENT || + iommu->pci_bus >= 0 || ++ iommu->accel != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ats != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ril != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ssid_size >= 0 || ++ iommu->oas >= 0 || + iommu->granule != 0) { + virReportError(VIR_ERR_XML_ERROR, + _("iommu model '%1$s' doesn't support some additional attributes"), +@@ -3245,6 +3265,11 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu) + if (iommu->pt != VIR_TRISTATE_SWITCH_ABSENT || + iommu->xtsup != VIR_TRISTATE_SWITCH_ABSENT || + iommu->pci_bus >= 0 || ++ iommu->accel != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ats != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ril != VIR_TRISTATE_SWITCH_ABSENT || ++ iommu->ssid_size >= 0 || ++ iommu->oas >= 0 || + iommu->granule != 0) { + virReportError(VIR_ERR_XML_ERROR, + _("iommu model '%1$s' doesn't support some additional attributes"), +diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng +index 121e4e06a6..c7d7ebc876 100644 +--- a/src/conf/schemas/domaincommon.rng ++++ b/src/conf/schemas/domaincommon.rng +@@ -6454,6 +6454,31 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c +index e726dc661c..2d5eaa1e80 100644 +--- a/src/qemu/qemu_command.c ++++ b/src/qemu/qemu_command.c +@@ -6276,6 +6276,8 @@ qemuBuildPCINestedSmmuv3DevProps(const virDomainDef *def, + { + g_autoptr(virJSONValue) props = NULL; + g_autofree char *bus = NULL; ++ g_autofree char *ssidsizeStr = NULL; ++ g_autofree char *oasStr = NULL; + virPCIDeviceAddress addr = { .bus = iommu->pci_bus }; + + bus = qemuBuildDeviceAddressPCIGetBus(def, &addr); +@@ -6286,10 +6288,23 @@ qemuBuildPCINestedSmmuv3DevProps(const virDomainDef *def, + return NULL; + } + ++ if (iommu->ssid_size >= 0) { ++ ssidsizeStr = g_strdup_printf("%u", iommu->ssid_size); ++ } ++ ++ if (iommu->oas >= 0) { ++ oasStr = g_strdup_printf("%u", iommu->oas); ++ } ++ + if (virJSONValueObjectAdd(&props, + "s:driver", "arm-smmuv3", + "s:primary-bus", bus, + "s:id", iommu->info.alias, ++ "T:accel", iommu->accel, ++ "S:ats", qemuOnOffAuto(iommu->ats), ++ "S:ril", qemuOnOffAuto(iommu->ril), ++ "S:ssidsize", ssidsizeStr, ++ "S:oas", oasStr, + NULL) < 0) + return NULL; + +diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c +index 2da99329c5..1093eb8363 100644 +--- a/src/qemu/qemu_validate.c ++++ b/src/qemu/qemu_validate.c +@@ -5827,6 +5827,18 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, + return -1; + } + ++ /* While QEMU_CAPS_ARM_SMMUV3_ACCEL tracks the .accel attribute of ++ * arm-smmuv3 it is also a good indicator of .ats, .ril, .ssidsize, and ++ * .oas attributes as all of them were introduced in the same release, ++ * and these features are meant to be backported all together. */ ++ if (iommu->model == VIR_DOMAIN_IOMMU_MODEL_SMMUV3 && ++ iommu->accel != VIR_TRISTATE_SWITCH_ABSENT && ++ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_ARM_SMMUV3_ACCEL)) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", ++ _("iommu: accel is not supported with this QEMU binary")); ++ return -1; ++ } ++ + if (iommu->granule > 0) { + /* QEMU supports only 4KiB, 8KiB, 16KiB and 64KiB granule size */ + if (!(iommu->granule == 4 || +-- +2.55.0 diff --git a/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_ACCEL.patch b/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_ACCEL.patch new file mode 100644 index 0000000..6e96e8a --- /dev/null +++ b/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_ACCEL.patch @@ -0,0 +1,81 @@ +From 613935cded2347bf61e0461ac8f72f2f99ceb18f Mon Sep 17 00:00:00 2001 +Message-ID: <613935cded2347bf61e0461ac8f72f2f99ceb18f.1786713644.git.jdenemar@redhat.com> +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:12:59 -0700 +Subject: [PATCH] qemu: introduce QEMU_CAPS_ARM_SMMUV3_ACCEL + +The arm-smmuv3 accel device property, used for HW-accelerated nested +SMMUv3, was added in QEMU 11.0.0 on top of the pluggable device +introduced in 10.2. Probe it alongside smmu_per_bus via +device-list-properties. + +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit 90b01b9d3e3b684837190e92257eba15511515b0) + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + src/qemu/qemu_capabilities.c | 2 ++ + src/qemu/qemu_capabilities.h | 1 + + tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml | 1 + + 4 files changed, 5 insertions(+) + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index a7d121f917..c60ca02d97 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -769,6 +769,7 @@ VIR_ENUM_IMPL(virQEMUCaps, + "blockdev-mirror.target-is-zero", /* QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO */ + "arm-smmuv3", /* QEMU_CAPS_DEVICE_ARM_SMMUV3 */ + "arm-smmuv3.smmu_per_bus", /* QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS */ ++ "arm-smmuv3.accel", /* QEMU_CAPS_ARM_SMMUV3_ACCEL */ + ); + + +@@ -1648,6 +1649,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsAMDIOMMU[] = { + + static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsArmSmmuv3[] = { + { "smmu_per_bus", QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS, NULL }, ++ { "accel", QEMU_CAPS_ARM_SMMUV3_ACCEL, NULL }, + }; + + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ +diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h +index 0dc9836ca9..28085144a2 100644 +--- a/src/qemu/qemu_capabilities.h ++++ b/src/qemu/qemu_capabilities.h +@@ -743,6 +743,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ + QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO, /* 'blockdev-mirror' supports 'target-is-zero' */ + QEMU_CAPS_DEVICE_ARM_SMMUV3, /* -device arm-smmuv3 */ + QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS, /* arm-smmuv3.smmu_per_bus */ ++ QEMU_CAPS_ARM_SMMUV3_ACCEL, /* arm-smmuv3.accel */ + + QEMU_CAPS_LAST /* this must always be the last item */ + } virQEMUCapsFlags; +diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +index 2280800fca..ca6def23dc 100644 +--- a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +@@ -190,6 +190,7 @@ + + + ++ + 11000000 + 61700286 + v11.0.0 +diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +index b4200f35bb..306f2981c1 100644 +--- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +@@ -190,6 +190,7 @@ + + + ++ + 11000050 + 61700287 + v11.0.0-1600-g5611a9268d +-- +2.55.0 diff --git a/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS.patch b/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS.patch new file mode 100644 index 0000000..fd0deb1 --- /dev/null +++ b/libvirt-qemu-introduce-QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS.patch @@ -0,0 +1,2225 @@ +From 0be99565981f968a4c7bdc7412a426d3149dc68f Mon Sep 17 00:00:00 2001 +Message-ID: <0be99565981f968a4c7bdc7412a426d3149dc68f.1786713644.git.jdenemar@redhat.com> +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:12:58 -0700 +Subject: [PATCH] qemu: introduce QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS + +The arm-smmuv3 QOM type appears in qom-list-types on ARM QEMU as far +back as 8.2 because the type is used for machine-integrated IOMMU +(-machine virt,iommu=smmuv3). That reply does not indicate support +for a user-pluggable -device arm-smmuv3. + +User-pluggable SMMUv3 with the smmu_per_bus property was added in QEMU +10.2.0. Probe that property via device-list-properties, gated on +QEMU_CAPS_DEVICE_SMMUV3, so the capability tracks pluggable device +support rather than mere QOM visibility. + +In qemu_validate.c, an IOMMU with pci_bus set requires +QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS; machine-integrated SMMUv3 without +pci_bus keeps using QEMU_CAPS_MACHINE_VIRT_IOMMU. + +Update caps_8.2.0_aarch64, caps_9.2.0_aarch64, caps_10.0.0_aarch64, +caps_10.2.0_aarch64, caps_11.0.0_aarch64, caps_8.2.0_armv7l, and +caps_11.1.0_aarch64 .replies with the arm-smmuv3 device-list-properties +exchange. + +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit 9bde1c4049f48237c7795e34048812522e342ad8) + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + src/qemu/qemu_capabilities.c | 8 + + src/qemu/qemu_capabilities.h | 1 + + src/qemu/qemu_validate.c | 8 + + .../caps_10.0.0_aarch64.replies | 79 ++++--- + .../caps_10.2.0_aarch64.replies | 167 +++++++------ + .../caps_10.2.0_aarch64.xml | 1 + + .../caps_11.0.0_aarch64.replies | 210 +++++++++++------ + .../caps_11.0.0_aarch64.xml | 1 + + .../caps_11.1.0_aarch64.replies | 221 ++++++++++++------ + .../caps_11.1.0_aarch64.xml | 1 + + .../caps_8.2.0_aarch64.replies | 79 ++++--- + .../caps_8.2.0_armv7l.replies | 79 ++++--- + .../caps_9.2.0_aarch64+hvf.replies | 75 ++++-- + 13 files changed, 627 insertions(+), 303 deletions(-) + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index 33efc6651b..a7d121f917 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -768,6 +768,7 @@ VIR_ENUM_IMPL(virQEMUCaps, + /* 495 */ + "blockdev-mirror.target-is-zero", /* QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO */ + "arm-smmuv3", /* QEMU_CAPS_DEVICE_ARM_SMMUV3 */ ++ "arm-smmuv3.smmu_per_bus", /* QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS */ + ); + + +@@ -1645,6 +1646,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsAMDIOMMU[] = { + { "xtsup", QEMU_CAPS_AMD_IOMMU_XTSUP, NULL }, + }; + ++static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsArmSmmuv3[] = { ++ { "smmu_per_bus", QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS, NULL }, ++}; ++ + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ + static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { + { "blockdev-add/arg-type/+file/drop-cache", QEMU_CAPS_MIGRATION_FILE_DROP_CACHE }, +@@ -1810,6 +1815,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { + { "amd-iommu", virQEMUCapsDevicePropsAMDIOMMU, + G_N_ELEMENTS(virQEMUCapsDevicePropsAMDIOMMU), + QEMU_CAPS_AMD_IOMMU }, ++ { "arm-smmuv3", virQEMUCapsDevicePropsArmSmmuv3, ++ G_N_ELEMENTS(virQEMUCapsDevicePropsArmSmmuv3), ++ QEMU_CAPS_DEVICE_ARM_SMMUV3 }, + { "scsi-block", virQEMUCapsDevicePropsSCSIBlock, + G_N_ELEMENTS(virQEMUCapsDevicePropsSCSIBlock), + -1 }, +diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h +index e5d589b0c4..0dc9836ca9 100644 +--- a/src/qemu/qemu_capabilities.h ++++ b/src/qemu/qemu_capabilities.h +@@ -742,6 +742,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ + /* 495 */ + QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO, /* 'blockdev-mirror' supports 'target-is-zero' */ + QEMU_CAPS_DEVICE_ARM_SMMUV3, /* -device arm-smmuv3 */ ++ QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS, /* arm-smmuv3.smmu_per_bus */ + + QEMU_CAPS_LAST /* this must always be the last item */ + } virQEMUCapsFlags; +diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c +index 439d4b1916..2da99329c5 100644 +--- a/src/qemu/qemu_validate.c ++++ b/src/qemu/qemu_validate.c +@@ -5711,6 +5711,14 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMUDef *iommu, + virDomainIOMMUModelTypeToString(iommu->model)); + return -1; + } ++ if (iommu->pci_bus >= 0) { ++ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_ARM_SMMUV3_SMMU_PER_BUS)) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, ++ _("IOMMU device: Setting pciBus for '%1$s' is not supported with this QEMU binary"), ++ virDomainIOMMUModelTypeToString(iommu->model)); ++ return -1; ++ } ++ } + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_VIRT_IOMMU)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("IOMMU device: '%1$s' is not supported with this QEMU binary"), +diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.replies +index 0448dcaab9..382b76e021 100644 +--- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.replies ++++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.replies +@@ -32067,17 +32067,44 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-31" + } + ++{ ++ "return": [ ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ } ++ ], ++ "id": "libvirt-31" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-32" ++} ++ + { + "error": { + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-31" ++ "id": "libvirt-32" + } + + { +@@ -32085,7 +32112,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -32093,7 +32120,7 @@ + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -32101,7 +32128,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -32191,7 +32218,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -32199,7 +32226,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -32278,7 +32305,7 @@ + "type": "int" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -32286,7 +32313,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -32534,12 +32561,12 @@ + "type": "link" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { + "execute": "query-machines", +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -33634,7 +33661,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -33642,7 +33669,7 @@ + "arguments": { + "typename": "virt-10.0-machine" + }, +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -33889,7 +33916,7 @@ + "type": "string" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -33897,7 +33924,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -34016,12 +34043,12 @@ + "type": "bool" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -34315,12 +34342,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -35787,12 +35814,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -35808,7 +35835,7 @@ + "kernel": false + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -35819,7 +35846,7 @@ + "name": "host" + } + }, +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -35852,7 +35879,7 @@ + } + } + }, +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -35867,11 +35894,11 @@ + } + } + }, +- "id": "libvirt-43" ++ "id": "libvirt-44" + } + + { +- "id": "libvirt-43", ++ "id": "libvirt-44", + "error": { + "class": "GenericError", + "desc": "Parameter 'model.props.hv-passthrough' is unexpected" +diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.replies +index 2a5be22ed8..c0cb15aa3a 100644 +--- a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.replies ++++ b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.replies +@@ -33933,11 +33933,44 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-32" + } + ++{ ++ "return": [ ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "default-value": false, ++ "name": "smmu_per_bus", ++ "description": "on/off", ++ "type": "bool" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ } ++ ], ++ "id": "libvirt-32" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-33" ++} ++ + { + "return": [ + { +@@ -34008,7 +34041,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -34016,7 +34049,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -34057,7 +34090,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -34065,7 +34098,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34159,7 +34192,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34167,7 +34200,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34236,7 +34269,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34244,7 +34277,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -34492,12 +34525,12 @@ + "type": "link" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-machines", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35539,7 +35572,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35547,7 +35580,7 @@ + "arguments": { + "typename": "virt-10.2-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35810,7 +35843,7 @@ + "type": "child" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35818,7 +35851,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -35943,12 +35976,12 @@ + "type": "bool" + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -36176,12 +36209,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -37743,12 +37776,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -37764,50 +37797,6 @@ + "kernel": true + } + ], +- "id": "libvirt-42" +-} +- +-{ +- "execute": "query-cpu-model-expansion", +- "arguments": { +- "type": "full", +- "model": { +- "name": "host" +- } +- }, +- "id": "libvirt-43" +-} +- +-{ +- "return": { +- "model": { +- "name": "host", +- "props": { +- "sve768": false, +- "sve128": false, +- "sve1024": false, +- "sve1280": false, +- "sve896": false, +- "sve256": false, +- "sve1536": false, +- "sve1792": false, +- "sve384": false, +- "sve": false, +- "sve2048": false, +- "pauth": false, +- "kvm-no-adjvtime": false, +- "sve512": false, +- "aarch64": true, +- "pmu": true, +- "sve1920": false, +- "sve1152": false, +- "kvm-steal-time": true, +- "sve640": false, +- "sve1408": false, +- "sve1664": false +- } +- } +- }, + "id": "libvirt-43" + } + +@@ -37855,6 +37844,50 @@ + "id": "libvirt-44" + } + ++{ ++ "execute": "query-cpu-model-expansion", ++ "arguments": { ++ "type": "full", ++ "model": { ++ "name": "host" ++ } ++ }, ++ "id": "libvirt-45" ++} ++ ++{ ++ "return": { ++ "model": { ++ "name": "host", ++ "props": { ++ "sve768": false, ++ "sve128": false, ++ "sve1024": false, ++ "sve1280": false, ++ "sve896": false, ++ "sve256": false, ++ "sve1536": false, ++ "sve1792": false, ++ "sve384": false, ++ "sve": false, ++ "sve2048": false, ++ "pauth": false, ++ "kvm-no-adjvtime": false, ++ "sve512": false, ++ "aarch64": true, ++ "pmu": true, ++ "sve1920": false, ++ "sve1152": false, ++ "kvm-steal-time": true, ++ "sve640": false, ++ "sve1408": false, ++ "sve1664": false ++ } ++ } ++ }, ++ "id": "libvirt-45" ++} ++ + { + "execute": "query-cpu-model-expansion", + "arguments": { +@@ -37867,11 +37900,11 @@ + } + } + }, +- "id": "libvirt-45" ++ "id": "libvirt-46" + } + + { +- "id": "libvirt-45", ++ "id": "libvirt-46", + "error": { + "class": "GenericError", + "desc": "Parameter 'model.props.hv-passthrough' is unexpected" +diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml +index 449f2f65c7..f3d06927f6 100644 +--- a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml +@@ -187,6 +187,7 @@ + + + ++ + 10002000 + 61700287 + v10.2.0 +diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.replies +index fef7dd9730..078716745d 100644 +--- a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.replies ++++ b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.replies +@@ -33845,11 +33845,87 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-32" + } + ++{ ++ "return": [ ++ { ++ "name": "memory", ++ "type": "link" ++ }, ++ { ++ "name": "secure-memory", ++ "type": "link" ++ }, ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "default-value": false, ++ "name": "smmu_per_bus", ++ "description": "on/off", ++ "type": "bool" ++ }, ++ { ++ "default-value": "44", ++ "name": "oas", ++ "description": "Specify Output Address Size (for accel=on). Supported values are 44 or 48 bits. Defaults to 44 bits. oas=auto is not supported.", ++ "type": "OasMode" ++ }, ++ { ++ "default-value": "on", ++ "name": "ril", ++ "description": "Disable range invalidation support (for accel=on). ril=auto is not supported.", ++ "type": "OnOffAuto" ++ }, ++ { ++ "default-value": 0, ++ "name": "msi-gpa", ++ "type": "uint64" ++ }, ++ { ++ "default-value": false, ++ "name": "accel", ++ "description": "Enable SMMUv3 accelerator support. Allows host SMMUv3 to be configured in nested mode for vfio-pci dev assignment", ++ "type": "bool" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ }, ++ { ++ "default-value": "0", ++ "name": "ssidsize", ++ "description": "Number of bits used to represent SubstreamIDs (SSIDs). A value of N allows SSIDs in the range [0 .. 2^N - 1]. Valid range is 0-20, where 0 disables SubstreamID support. Defaults to 0. A value greater than 0 is required to enable PASID support. ssidsize=auto is not supported.", ++ "type": "SsidSizeMode" ++ }, ++ { ++ "default-value": "off", ++ "name": "ats", ++ "description": "Enable/disable ATS support (for accel=on). Please ensure host platform has ATS support before enabling this. ats=auto is not supported.", ++ "type": "OnOffAuto" ++ } ++ ], ++ "id": "libvirt-32" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-33" ++} ++ + { + "return": [ + { +@@ -33926,7 +34002,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -33934,7 +34010,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -33975,7 +34051,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -33983,7 +34059,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34077,7 +34153,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34085,7 +34161,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34154,7 +34230,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34162,7 +34238,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -34411,12 +34487,12 @@ + "type": "link" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-machines", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35466,7 +35542,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35474,7 +35550,7 @@ + "arguments": { + "typename": "virt-11.0-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35752,7 +35828,7 @@ + "type": "child" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35760,7 +35836,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -35890,12 +35966,12 @@ + "type": "bool" + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -36123,12 +36199,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -37709,12 +37785,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -37730,50 +37806,6 @@ + "kernel": true + } + ], +- "id": "libvirt-42" +-} +- +-{ +- "execute": "query-cpu-model-expansion", +- "arguments": { +- "type": "full", +- "model": { +- "name": "host" +- } +- }, +- "id": "libvirt-43" +-} +- +-{ +- "return": { +- "model": { +- "name": "host", +- "props": { +- "sve768": false, +- "sve128": false, +- "sve1024": false, +- "sve1280": false, +- "sve896": false, +- "sve256": false, +- "sve1536": false, +- "sve1792": false, +- "sve384": false, +- "sve": false, +- "sve2048": false, +- "pauth": false, +- "kvm-no-adjvtime": false, +- "sve512": false, +- "aarch64": true, +- "pmu": true, +- "sve1920": false, +- "sve1152": false, +- "kvm-steal-time": true, +- "sve640": false, +- "sve1408": false, +- "sve1664": false +- } +- } +- }, + "id": "libvirt-43" + } + +@@ -37821,6 +37853,50 @@ + "id": "libvirt-44" + } + ++{ ++ "execute": "query-cpu-model-expansion", ++ "arguments": { ++ "type": "full", ++ "model": { ++ "name": "host" ++ } ++ }, ++ "id": "libvirt-45" ++} ++ ++{ ++ "return": { ++ "model": { ++ "name": "host", ++ "props": { ++ "sve768": false, ++ "sve128": false, ++ "sve1024": false, ++ "sve1280": false, ++ "sve896": false, ++ "sve256": false, ++ "sve1536": false, ++ "sve1792": false, ++ "sve384": false, ++ "sve": false, ++ "sve2048": false, ++ "pauth": false, ++ "kvm-no-adjvtime": false, ++ "sve512": false, ++ "aarch64": true, ++ "pmu": true, ++ "sve1920": false, ++ "sve1152": false, ++ "kvm-steal-time": true, ++ "sve640": false, ++ "sve1408": false, ++ "sve1664": false ++ } ++ } ++ }, ++ "id": "libvirt-45" ++} ++ + { + "execute": "query-cpu-model-expansion", + "arguments": { +@@ -37833,11 +37909,11 @@ + } + } + }, +- "id": "libvirt-45" ++ "id": "libvirt-46" + } + + { +- "id": "libvirt-45", ++ "id": "libvirt-46", + "error": { + "class": "GenericError", + "desc": "Parameter 'model.props.hv-passthrough' is unexpected" +diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +index b9acf8ac67..2280800fca 100644 +--- a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +@@ -189,6 +189,7 @@ + + + ++ + 11000000 + 61700286 + v11.0.0 +diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies +index 41cd5496c6..c91d77655d 100644 +--- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies ++++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies +@@ -33939,11 +33939,98 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-32" + } + ++{ ++ "return": [ ++ { ++ "name": "memory", ++ "type": "link" ++ }, ++ { ++ "name": "secure-memory", ++ "type": "link" ++ }, ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "default-value": false, ++ "name": "smmu_per_bus", ++ "description": "on/off", ++ "type": "bool" ++ }, ++ { ++ "default-value": "auto", ++ "name": "cmdqv", ++ "description": "Enable/disable CMDQV support (for accel=on). Valid values are on, off, and auto. Defaults to auto.", ++ "type": "OnOffAuto" ++ }, ++ { ++ "default-value": "auto", ++ "name": "ats", ++ "description": "Enable/disable ATS support (for accel=on). Valid values are on, off, and auto. Defaults to auto. Please ensure host platform supports ATS before setting it to on.", ++ "type": "OnOffAuto" ++ }, ++ { ++ "default-value": "auto", ++ "name": "oas", ++ "description": "Set Output Address Size in bits (for accel=on). Valid values are 44, 48, and auto. Defaults to auto.Please ensure the value does not exceed the maximum Output Address Size supported by the host platform.", ++ "type": "OasMode" ++ }, ++ { ++ "default-value": "auto", ++ "name": "ssidsize", ++ "description": "Set number of bits used to represent SubstreamIDs (SSIDs). Valid values are 0-20 and auto. Defaults to auto. A value of N allows SSIDs in the range [0 .. 2^N - 1]. A value of 0 disables SubstreamID support. A value greater than 0 is required to enable PASID support.Please ensure the value does not exceed the maximum SubstreamID size supported by the host platform.", ++ "type": "SsidSizeMode" ++ }, ++ { ++ "default-value": "auto", ++ "name": "ril", ++ "description": "Enable/disable range invalidation support (for accel=on). Valid values are on, off, and auto. Defaults to auto. Any attempt to turn it 'on' while the host does not support it would fail.", ++ "type": "OnOffAuto" ++ }, ++ { ++ "default-value": false, ++ "name": "accel", ++ "description": "Enable SMMUv3 accelerator support. Allows host SMMUv3 to be configured in nested mode for vfio-pci dev assignment. Please ensure the host SMMUv3 supports nested translation before enabling.", ++ "type": "bool" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ }, ++ { ++ "default-value": 0, ++ "name": "msi-gpa", ++ "type": "uint64" ++ }, ++ { ++ "default-value": 0, ++ "name": "identifier", ++ "type": "uint8" ++ } ++ ], ++ "id": "libvirt-32" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-33" ++} ++ + { + "return": [ + { +@@ -34020,7 +34107,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -34028,7 +34115,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -34069,7 +34156,7 @@ + "type": "int32" + } + ], +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -34077,7 +34164,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34171,7 +34258,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -34179,7 +34266,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34248,7 +34335,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -34256,7 +34343,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -34511,12 +34598,12 @@ + "type": "link" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-machines", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35555,7 +35642,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -35563,7 +35650,7 @@ + "arguments": { + "typename": "virt-11.1-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35841,7 +35928,7 @@ + "type": "child" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -35849,7 +35936,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -35979,12 +36066,12 @@ + "type": "bool" + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -36212,12 +36299,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -37810,12 +37897,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -37831,50 +37918,6 @@ + "kernel": true + } + ], +- "id": "libvirt-42" +-} +- +-{ +- "execute": "query-cpu-model-expansion", +- "arguments": { +- "type": "full", +- "model": { +- "name": "host" +- } +- }, +- "id": "libvirt-43" +-} +- +-{ +- "return": { +- "model": { +- "name": "host", +- "props": { +- "sve768": false, +- "sve128": false, +- "sve1024": false, +- "sve1280": false, +- "sve896": false, +- "sve256": false, +- "sve1536": false, +- "sve1792": false, +- "sve384": false, +- "sve": false, +- "sve2048": false, +- "pauth": false, +- "kvm-no-adjvtime": false, +- "sve512": false, +- "aarch64": true, +- "pmu": true, +- "sve1920": false, +- "sve1152": false, +- "kvm-steal-time": true, +- "sve640": false, +- "sve1408": false, +- "sve1664": false +- } +- } +- }, + "id": "libvirt-43" + } + +@@ -37922,6 +37965,50 @@ + "id": "libvirt-44" + } + ++{ ++ "execute": "query-cpu-model-expansion", ++ "arguments": { ++ "type": "full", ++ "model": { ++ "name": "host" ++ } ++ }, ++ "id": "libvirt-45" ++} ++ ++{ ++ "return": { ++ "model": { ++ "name": "host", ++ "props": { ++ "sve768": false, ++ "sve128": false, ++ "sve1024": false, ++ "sve1280": false, ++ "sve896": false, ++ "sve256": false, ++ "sve1536": false, ++ "sve1792": false, ++ "sve384": false, ++ "sve": false, ++ "sve2048": false, ++ "pauth": false, ++ "kvm-no-adjvtime": false, ++ "sve512": false, ++ "aarch64": true, ++ "pmu": true, ++ "sve1920": false, ++ "sve1152": false, ++ "kvm-steal-time": true, ++ "sve640": false, ++ "sve1408": false, ++ "sve1664": false ++ } ++ } ++ }, ++ "id": "libvirt-45" ++} ++ + { + "execute": "query-cpu-model-expansion", + "arguments": { +@@ -37934,11 +38021,11 @@ + } + } + }, +- "id": "libvirt-45" ++ "id": "libvirt-46" + } + + { +- "id": "libvirt-45", ++ "id": "libvirt-46", + "error": { + "class": "GenericError", + "desc": "Parameter 'model.props.hv-passthrough' is unexpected" +diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +index 0595e5f88c..b4200f35bb 100644 +--- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +@@ -189,6 +189,7 @@ + + + ++ + 11000050 + 61700287 + v11.0.0-1600-g5611a9268d +diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.replies +index 002ca31b9f..c4d0be6029 100644 +--- a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.replies ++++ b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.replies +@@ -31157,17 +31157,44 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-32" + } + ++{ ++ "return": [ ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ } ++ ], ++ "id": "libvirt-32" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-33" ++} ++ + { + "error": { + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -31175,7 +31202,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -31183,7 +31210,7 @@ + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -31191,7 +31218,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -31281,7 +31308,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -31289,7 +31316,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -31368,7 +31395,7 @@ + "type": "int" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -31376,7 +31403,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -31585,12 +31612,12 @@ + "type": "bool" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-machines", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -32702,7 +32729,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -32710,7 +32737,7 @@ + "arguments": { + "typename": "virt-8.2-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -32946,7 +32973,7 @@ + "type": "child" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -32954,7 +32981,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -33067,12 +33094,12 @@ + "type": "child" + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -33366,12 +33393,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -34736,12 +34763,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -34757,7 +34784,7 @@ + "kernel": false + } + ], +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -34768,7 +34795,7 @@ + "name": "host" + } + }, +- "id": "libvirt-43" ++ "id": "libvirt-44" + } + + { +@@ -34801,7 +34828,7 @@ + } + } + }, +- "id": "libvirt-43" ++ "id": "libvirt-44" + } + + { +@@ -34816,11 +34843,11 @@ + } + } + }, +- "id": "libvirt-44" ++ "id": "libvirt-45" + } + + { +- "id": "libvirt-44", ++ "id": "libvirt-45", + "error": { + "class": "GenericError", + "desc": "Parameter 'hv-passthrough' is unexpected" +diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.replies b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.replies +index b8f7b6f68a..51cd48e1d1 100644 +--- a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.replies ++++ b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.replies +@@ -31391,17 +31391,44 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-32" + } + ++{ ++ "return": [ ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ } ++ ], ++ "id": "libvirt-32" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-33" ++} ++ + { + "error": { + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -31409,7 +31436,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -31417,7 +31444,7 @@ + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -31425,7 +31452,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -31519,7 +31546,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -31527,7 +31554,7 @@ + "arguments": { + "typename": "memory-backend-memfd" + }, +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -31606,7 +31633,7 @@ + "type": "int" + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -31614,7 +31641,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -31756,12 +31783,12 @@ + "type": "link" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-machines", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -32819,7 +32846,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -32827,7 +32854,7 @@ + "arguments": { + "typename": "virt-8.2-machine" + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -33063,7 +33090,7 @@ + "type": "child" + } + ], +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +@@ -33071,7 +33098,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +@@ -33184,12 +33211,12 @@ + "type": "child" + } + ], +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { +@@ -33411,12 +33438,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-40" ++ "id": "libvirt-41" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { +@@ -34898,12 +34925,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-41" ++ "id": "libvirt-42" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -34919,7 +34946,7 @@ + "kernel": false + } + ], +- "id": "libvirt-42" ++ "id": "libvirt-43" + } + + { +@@ -34930,11 +34957,11 @@ + "name": "host" + } + }, +- "id": "libvirt-43" ++ "id": "libvirt-44" + } + + { +- "id": "libvirt-43", ++ "id": "libvirt-44", + "error": { + "class": "GenericError", + "desc": "The CPU type 'host' requires KVM" +@@ -34953,11 +34980,11 @@ + } + } + }, +- "id": "libvirt-44" ++ "id": "libvirt-45" + } + + { +- "id": "libvirt-44", ++ "id": "libvirt-45", + "error": { + "class": "GenericError", + "desc": "The CPU type 'host' requires KVM" +diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.replies b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.replies +index 14b11c5c30..31b13f865b 100644 +--- a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.replies ++++ b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.replies +@@ -30532,17 +30532,44 @@ + { + "execute": "device-list-properties", + "arguments": { +- "typename": "scsi-block" ++ "typename": "arm-smmuv3" + }, + "id": "libvirt-28" + } + ++{ ++ "return": [ ++ { ++ "name": "primary-bus", ++ "type": "link" ++ }, ++ { ++ "default-value": 0, ++ "name": "bus_num", ++ "type": "uint8" ++ }, ++ { ++ "name": "stage", ++ "type": "str" ++ } ++ ], ++ "id": "libvirt-28" ++} ++ ++{ ++ "execute": "device-list-properties", ++ "arguments": { ++ "typename": "scsi-block" ++ }, ++ "id": "libvirt-29" ++} ++ + { + "error": { + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-28" ++ "id": "libvirt-29" + } + + { +@@ -30550,7 +30577,7 @@ + "arguments": { + "typename": "scsi-generic" + }, +- "id": "libvirt-29" ++ "id": "libvirt-30" + } + + { +@@ -30558,7 +30585,7 @@ + "class": "DeviceNotFound", + "desc": "The libvirt device dump was not collected for this version+device tuple" + }, +- "id": "libvirt-29" ++ "id": "libvirt-30" + } + + { +@@ -30566,7 +30593,7 @@ + "arguments": { + "typename": "memory-backend-file" + }, +- "id": "libvirt-30" ++ "id": "libvirt-31" + } + + { +@@ -30651,7 +30678,7 @@ + "type": "bool" + } + ], +- "id": "libvirt-30" ++ "id": "libvirt-31" + } + + { +@@ -30659,7 +30686,7 @@ + "arguments": { + "typename": "max-arm-cpu" + }, +- "id": "libvirt-31" ++ "id": "libvirt-32" + } + + { +@@ -30816,12 +30843,12 @@ + "type": "link" + } + ], +- "id": "libvirt-31" ++ "id": "libvirt-32" + } + + { + "execute": "query-machines", +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -31871,7 +31898,7 @@ + "default-ram-id": "ram" + } + ], +- "id": "libvirt-32" ++ "id": "libvirt-33" + } + + { +@@ -31879,7 +31906,7 @@ + "arguments": { + "typename": "virt-9.2-machine" + }, +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -32120,7 +32147,7 @@ + "type": "child" + } + ], +- "id": "libvirt-33" ++ "id": "libvirt-34" + } + + { +@@ -32128,7 +32155,7 @@ + "arguments": { + "typename": "none-machine" + }, +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { +@@ -32246,12 +32273,12 @@ + "type": "child" + } + ], +- "id": "libvirt-34" ++ "id": "libvirt-35" + } + + { + "execute": "query-cpu-definitions", +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { +@@ -32545,12 +32572,12 @@ + "deprecated": false + } + ], +- "id": "libvirt-35" ++ "id": "libvirt-36" + } + + { + "execute": "query-command-line-options", +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { +@@ -33866,12 +33893,12 @@ + "option": "drive" + } + ], +- "id": "libvirt-36" ++ "id": "libvirt-37" + } + + { + "execute": "query-gic-capabilities", +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -33887,7 +33914,7 @@ + "kernel": false + } + ], +- "id": "libvirt-37" ++ "id": "libvirt-38" + } + + { +@@ -33898,11 +33925,11 @@ + "name": "host" + } + }, +- "id": "libvirt-38" ++ "id": "libvirt-39" + } + + { +- "id": "libvirt-38", ++ "id": "libvirt-39", + "error": { + "class": "GenericError", + "desc": "The CPU type 'host' requires KVM" +@@ -33921,11 +33948,11 @@ + } + } + }, +- "id": "libvirt-39" ++ "id": "libvirt-40" + } + + { +- "id": "libvirt-39", ++ "id": "libvirt-40", + "error": { + "class": "GenericError", + "desc": "The CPU type 'host' requires KVM" +-- +2.55.0 diff --git a/libvirt-qemu-introduce-QEMU_CAPS_DEVICE_ARM_SMMUV3.patch b/libvirt-qemu-introduce-QEMU_CAPS_DEVICE_ARM_SMMUV3.patch new file mode 100644 index 0000000..fdc256c --- /dev/null +++ b/libvirt-qemu-introduce-QEMU_CAPS_DEVICE_ARM_SMMUV3.patch @@ -0,0 +1,152 @@ +From 59f9683dd189584af437b03fec40006c03be581e Mon Sep 17 00:00:00 2001 +Message-ID: <59f9683dd189584af437b03fec40006c03be581e.1786713643.git.jdenemar@redhat.com> +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:12:57 -0700 +Subject: [PATCH] qemu: introduce QEMU_CAPS_DEVICE_ARM_SMMUV3 + +The arm-smmuv3 QOM type is reported by qom-list-types on ARM QEMU. +Register it as QEMU_CAPS_DEVICE_ARM_SMMUV3 so later device-list-properties +probing for arm-smmuv3 properties can be gated on this capability +instead of an architecture check. + +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit 93e0d7845585fd42fc770991e5eb9f365c96d6bb) + +Conflicts: + src/qemu/qemu_capabilities.c + src/qemu/qemu_capabilities.h + tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml + - missing upstream commit 248981ff51116e06d3b7be7dbd33559a45261e24 + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + src/qemu/qemu_capabilities.c | 2 ++ + src/qemu/qemu_capabilities.h | 1 + + tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml | 1 + + tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml | 1 + + tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml | 1 + + 9 files changed, 10 insertions(+) + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index be57dcad8e..33efc6651b 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -767,6 +767,7 @@ VIR_ENUM_IMPL(virQEMUCaps, + + /* 495 */ + "blockdev-mirror.target-is-zero", /* QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO */ ++ "arm-smmuv3", /* QEMU_CAPS_DEVICE_ARM_SMMUV3 */ + ); + + +@@ -1480,6 +1481,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { + { "iommufd", QEMU_CAPS_OBJECT_IOMMUFD }, + { "uefi-vars-x64", QEMU_CAPS_DEVICE_UEFI_VARS }, + { "uefi-vars-sysbus", QEMU_CAPS_DEVICE_UEFI_VARS }, ++ { "arm-smmuv3", QEMU_CAPS_DEVICE_ARM_SMMUV3 }, + }; + + +diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h +index 3014f3dc5e..e5d589b0c4 100644 +--- a/src/qemu/qemu_capabilities.h ++++ b/src/qemu/qemu_capabilities.h +@@ -741,6 +741,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ + + /* 495 */ + QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO, /* 'blockdev-mirror' supports 'target-is-zero' */ ++ QEMU_CAPS_DEVICE_ARM_SMMUV3, /* -device arm-smmuv3 */ + + QEMU_CAPS_LAST /* this must always be the last item */ + } virQEMUCapsFlags; +diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml +index b6434e6019..b2a0872853 100644 +--- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml +@@ -166,6 +166,7 @@ + + + ++ + 10000000 + 61700285 + v10.0.0 +diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml +index df3e2a8275..449f2f65c7 100644 +--- a/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_10.2.0_aarch64.xml +@@ -186,6 +186,7 @@ + + + ++ + 10002000 + 61700287 + v10.2.0 +diff --git a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +index 3fdc0d6621..b9acf8ac67 100644 +--- a/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.0.0_aarch64.xml +@@ -188,6 +188,7 @@ + + + ++ + 11000000 + 61700286 + v11.0.0 +diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +index f7dd14a1ad..0595e5f88c 100644 +--- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.xml +@@ -188,6 +188,7 @@ + + + ++ + 11000050 + 61700287 + v11.0.0-1600-g5611a9268d +diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml +index bb70bcaf1f..e026abfd96 100644 +--- a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml ++++ b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml +@@ -161,6 +161,7 @@ + + + ++ + 8002000 + 61700246 + v8.2.0 +diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml +index 9590bc464a..d3af74bcb3 100644 +--- a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml ++++ b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml +@@ -168,6 +168,7 @@ + + + ++ + 8002000 + 0 + qemu-8.2.0-7.fc39 +diff --git a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml +index 9c843f9e5c..8c777c121e 100644 +--- a/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml ++++ b/tests/qemucapabilitiesdata/caps_9.2.0_aarch64+hvf.xml +@@ -136,6 +136,7 @@ + + + ++ + 9002002 + 61700247 + +-- +2.55.0 diff --git a/libvirt-tests-capabilityschemadata-Add-a-real-test-example.patch b/libvirt-tests-capabilityschemadata-Add-a-real-test-example.patch new file mode 100644 index 0000000..7927b93 --- /dev/null +++ b/libvirt-tests-capabilityschemadata-Add-a-real-test-example.patch @@ -0,0 +1,1063 @@ +From db581f666168fc080a337defffa98478c6128e93 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Peter Krempa +Date: Fri, 31 Jul 2026 16:26:33 +0200 +Subject: [PATCH] tests: capabilityschemadata: Add a real test example +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Data obtained by running: + + virsh -q capabilities > tests/capabilityschemadata/caps-qemu-real-full.xml + +Signed-off-by: Peter Krempa +Reviewed-by: Ján Tomko +(cherry picked from commit e3da3cf552513e7253294b40f634228918902635) +https://redhat.atlassian.net/browse/RHEL-222549 +--- + .../caps-qemu-real-full.xml | 1033 +++++++++++++++++ + 1 file changed, 1033 insertions(+) + create mode 100644 tests/capabilityschemadata/caps-qemu-real-full.xml + +diff --git a/tests/capabilityschemadata/caps-qemu-real-full.xml b/tests/capabilityschemadata/caps-qemu-real-full.xml +new file mode 100644 +index 0000000000..369101201b +--- /dev/null ++++ b/tests/capabilityschemadata/caps-qemu-real-full.xml +@@ -0,0 +1,1033 @@ ++ ++ ++ ++ 29fb382a-ac39-8995-b33c-bcfce7b79434 ++ ++ x86_64 ++ Opteron_G3-v1 ++ AMD ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ tcp ++ rdma ++ ++ ++ ++ ++ ++ 63393224 ++ 15848306 ++ 0 ++ 0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ selinux ++ 0 ++ system_u:system_r:svirt_t:s0 ++ system_u:system_r:svirt_tcg_t:s0 ++ ++ ++ dac ++ 0 ++ +107:+107 ++ +107:+107 ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-arm ++ virt-11.0 ++ virt ++ mori-bmc ++ ast2600-evb ++ qcom-dc-scm-v1-bmc ++ tiogapass-bmc ++ catalina-bmc ++ nuri ++ mcimx7d-sabre ++ mps3-an536 ++ romulus-bmc ++ npcm750-evb ++ rainier-bmc ++ mps3-an547 ++ realview-pbx-a9 ++ kzm ++ musca-b1 ++ versatileab ++ b-l475e-iot01a ++ fby35-bmc ++ musca-a ++ mcimx6ul-evk ++ virt-5.1 ++ virt-10.0 ++ smdkc210 ++ sx1 ++ imx25-pdk ++ stm32vldiscovery ++ orangepi-pc ++ quanta-q71l-bmc ++ virt-5.2 ++ virt-10.1 ++ xilinx-zynq-a9 ++ mps2-an500 ++ mps2-an521 ++ sabrelite ++ mps2-an511 ++ canon-a1100 ++ realview-eb ++ quanta-gbs-bmc ++ emcraft-sf2 ++ virt-10.2 ++ realview-pb-a8 ++ yosemitev2-bmc ++ virt-7.0 ++ virt-9.0 ++ raspi1ap ++ palmetto-bmc ++ sx1-v1 ++ gb200nvl-bmc ++ g220a-bmc ++ virt-7.1 ++ virt-9.1 ++ bletchley-bmc ++ quanta-gsj ++ versatilepb ++ realview-eb-mpcore ++ integratorcp ++ virt-7.2 ++ supermicrox11-bmc ++ virt-9.2 ++ witherspoon-bmc ++ qcom-firework-bmc ++ mps3-an524 ++ kudo-bmc ++ vexpress-a9 ++ musicpal ++ lm3s811evb ++ lm3s6965evb ++ supermicro-x11spi-bmc ++ microbit ++ fby35 ++ mps2-an385 ++ mps2-an505 ++ virt-6.0 ++ virt-8.0 ++ cubieboard ++ ast1030-evb ++ bpim2u ++ netduino2 ++ ast1060-evb ++ mps2-an386 ++ olimex-stm32-h405 ++ virt-6.1 ++ virt-8.1 ++ raspi2b ++ vexpress-a15 ++ virt-6.2 ++ fuji-bmc ++ max78000fthr ++ virt-8.2 ++ sonorapass-bmc ++ ast2500-evb ++ netduinoplus2 ++ collie ++ raspi0 ++ fp5280g2-bmc ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-arm ++ virt-11.0 ++ virt ++ mori-bmc ++ ast2600-evb ++ qcom-dc-scm-v1-bmc ++ tiogapass-bmc ++ catalina-bmc ++ nuri ++ mcimx7d-sabre ++ mps3-an536 ++ romulus-bmc ++ npcm750-evb ++ rainier-bmc ++ mps3-an547 ++ realview-pbx-a9 ++ kzm ++ musca-b1 ++ versatileab ++ b-l475e-iot01a ++ fby35-bmc ++ musca-a ++ mcimx6ul-evk ++ virt-5.1 ++ virt-10.0 ++ smdkc210 ++ sx1 ++ imx25-pdk ++ stm32vldiscovery ++ orangepi-pc ++ quanta-q71l-bmc ++ virt-5.2 ++ virt-10.1 ++ xilinx-zynq-a9 ++ mps2-an500 ++ mps2-an521 ++ sabrelite ++ mps2-an511 ++ canon-a1100 ++ realview-eb ++ quanta-gbs-bmc ++ emcraft-sf2 ++ virt-10.2 ++ realview-pb-a8 ++ yosemitev2-bmc ++ virt-7.0 ++ virt-9.0 ++ raspi1ap ++ palmetto-bmc ++ sx1-v1 ++ gb200nvl-bmc ++ g220a-bmc ++ virt-7.1 ++ virt-9.1 ++ bletchley-bmc ++ quanta-gsj ++ versatilepb ++ realview-eb-mpcore ++ integratorcp ++ virt-7.2 ++ supermicrox11-bmc ++ virt-9.2 ++ witherspoon-bmc ++ qcom-firework-bmc ++ mps3-an524 ++ kudo-bmc ++ vexpress-a9 ++ musicpal ++ lm3s811evb ++ lm3s6965evb ++ supermicro-x11spi-bmc ++ microbit ++ fby35 ++ mps2-an385 ++ mps2-an505 ++ virt-6.0 ++ virt-8.0 ++ cubieboard ++ ast1030-evb ++ bpim2u ++ netduino2 ++ ast1060-evb ++ mps2-an386 ++ olimex-stm32-h405 ++ virt-6.1 ++ virt-8.1 ++ raspi2b ++ vexpress-a15 ++ virt-6.2 ++ fuji-bmc ++ max78000fthr ++ virt-8.2 ++ sonorapass-bmc ++ ast2500-evb ++ netduinoplus2 ++ collie ++ raspi0 ++ fp5280g2-bmc ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-aarch64 ++ virt-11.0 ++ virt ++ mori-bmc ++ qcom-dc-scm-v1-bmc ++ ast2600-evb ++ tiogapass-bmc ++ catalina-bmc ++ ast2700fc ++ nuri ++ mcimx7d-sabre ++ mps3-an536 ++ romulus-bmc ++ npcm750-evb ++ rainier-bmc ++ mps3-an547 ++ realview-pbx-a9 ++ kzm ++ musca-b1 ++ versatileab ++ b-l475e-iot01a ++ fby35-bmc ++ musca-a ++ mcimx6ul-evk ++ virt-5.1 ++ virt-10.0 ++ smdkc210 ++ sx1 ++ imx25-pdk ++ imx8mp-evk ++ stm32vldiscovery ++ orangepi-pc ++ quanta-q71l-bmc ++ virt-5.2 ++ virt-10.1 ++ xilinx-zynq-a9 ++ xlnx-zcu102 ++ mps2-an500 ++ mps2-an521 ++ sabrelite ++ mps2-an511 ++ canon-a1100 ++ realview-eb ++ quanta-gbs-bmc ++ emcraft-sf2 ++ virt-10.2 ++ realview-pb-a8 ++ yosemitev2-bmc ++ sbsa-ref ++ virt-7.0 ++ virt-9.0 ++ amd-versal-virt ++ xlnx-versal-virt ++ raspi1ap ++ palmetto-bmc ++ sx1-v1 ++ gb200nvl-bmc ++ g220a-bmc ++ virt-7.1 ++ virt-9.1 ++ bletchley-bmc ++ quanta-gsj ++ versatilepb ++ npcm845-evb ++ realview-eb-mpcore ++ integratorcp ++ virt-7.2 ++ supermicrox11-bmc ++ virt-9.2 ++ witherspoon-bmc ++ qcom-firework-bmc ++ mps3-an524 ++ kudo-bmc ++ vexpress-a9 ++ musicpal ++ lm3s811evb ++ lm3s6965evb ++ supermicro-x11spi-bmc ++ ast2700a1-evb ++ microbit ++ fby35 ++ mps2-an385 ++ mps2-an505 ++ virt-6.0 ++ virt-8.0 ++ amd-versal2-virt ++ raspi3ap ++ cubieboard ++ ast2700a2-evb ++ ast2700-evb ++ ast1030-evb ++ bpim2u ++ netduino2 ++ ast1060-evb ++ raspi4b ++ mps2-an386 ++ olimex-stm32-h405 ++ virt-6.1 ++ virt-8.1 ++ raspi3b ++ raspi2b ++ vexpress-a15 ++ virt-6.2 ++ fuji-bmc ++ max78000fthr ++ virt-8.2 ++ sonorapass-bmc ++ ast2500-evb ++ netduinoplus2 ++ collie ++ raspi0 ++ fp5280g2-bmc ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-i386 ++ pc-i440fx-11.0 ++ pc ++ pc-q35-5.2 ++ pc-i440fx-10.2 ++ xenpv ++ pc-i440fx-6.2 ++ pc-i440fx-5.2 ++ pc-q35-9.1 ++ pc-q35-7.1 ++ pc-q35-8.1 ++ pc-q35-11.0 ++ q35 ++ pc-i440fx-8.1 ++ pc-q35-6.1 ++ pc-i440fx-9.1 ++ pc-q35-10.0 ++ pc-i440fx-7.1 ++ x-remote ++ pc-i440fx-10.1 ++ pc-q35-5.1 ++ pc-i440fx-6.1 ++ pc-i440fx-5.1 ++ isapc ++ pc-q35-9.0 ++ pc-q35-10.2 ++ pc-q35-7.0 ++ pc-q35-8.0 ++ pc-i440fx-8.0 ++ pc-q35-6.0 ++ pc-i440fx-9.0 ++ pc-i440fx-7.0 ++ nitro-enclave ++ xenpvh ++ pc-i440fx-10.0 ++ pc-q35-9.2 ++ pc-q35-7.2 ++ pc-i440fx-6.0 ++ xenfv-4.2 ++ microvm ++ pc-q35-8.2 ++ pc-i440fx-8.2 ++ pc-q35-6.2 ++ pc-i440fx-9.2 ++ pc-q35-10.1 ++ pc-i440fx-7.2 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-mips ++ malta ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-mipsel ++ malta ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-mips64 ++ malta ++ pica61 ++ magnum ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-mips64el ++ malta ++ loongson3-virt ++ pica61 ++ magnum ++ boston ++ fuloong2e ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-ppc ++ g3beige ++ ppe42_machine ++ amigaone ++ virtex-ml507 ++ mac99 ++ ppce500 ++ sam460ex ++ pegasos2 ++ bamboo ++ 40p ++ pegasos1 ++ mpc8544ds ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-ppc64 ++ pseries-11.0 ++ pseries ++ amigaone ++ powernv9 ++ mpc8544ds ++ pseries-6.1 ++ ppe42_machine ++ powernv10 ++ powernv ++ pseries-6.2 ++ powernv11 ++ ppce500 ++ pegasos1 ++ powernv10-rainier ++ powernv ++ pseries-8.0 ++ 40p ++ pegasos2 ++ pseries-8.1 ++ pseries-5.1 ++ bamboo ++ g3beige ++ pseries-8.2 ++ pseries-5.2 ++ pseries-7.0 ++ virtex-ml507 ++ pseries-9.0 ++ pseries-10.0 ++ pseries-7.1 ++ pseries-9.1 ++ pseries-10.1 ++ pseries-7.2 ++ mac99 ++ pseries-9.2 ++ sam460ex ++ pseries-10.2 ++ powernv8 ++ pseries-6.0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-ppc64 ++ pseries-11.0 ++ pseries ++ amigaone ++ powernv9 ++ mpc8544ds ++ pseries-6.1 ++ ppe42_machine ++ powernv10 ++ powernv ++ pseries-6.2 ++ powernv11 ++ ppce500 ++ pegasos1 ++ powernv10-rainier ++ powernv ++ pseries-8.0 ++ 40p ++ pegasos2 ++ pseries-8.1 ++ pseries-5.1 ++ bamboo ++ g3beige ++ pseries-8.2 ++ pseries-5.2 ++ pseries-7.0 ++ virtex-ml507 ++ pseries-9.0 ++ pseries-10.0 ++ pseries-7.1 ++ pseries-9.1 ++ pseries-10.1 ++ pseries-7.2 ++ mac99 ++ pseries-9.2 ++ sam460ex ++ pseries-10.2 ++ powernv8 ++ pseries-6.0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-riscv32 ++ virt ++ spike ++ opentitan ++ sifive_u ++ amd-microblaze-v-generic ++ sifive_e ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-riscv64 ++ virt ++ spike ++ boston-aia ++ xiangshan-kunminghu ++ sifive_u ++ microchip-icicle-kit ++ amd-microblaze-v-generic ++ shakti_c ++ sifive_e ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-s390x ++ s390-ccw-virtio-11.0 ++ s390-ccw-virtio ++ s390-ccw-virtio-8.0 ++ s390-ccw-virtio-6.0 ++ s390-ccw-virtio-7.0 ++ s390-ccw-virtio-9.2 ++ s390-ccw-virtio-10.1 ++ s390-ccw-virtio-8.2 ++ s390-ccw-virtio-6.2 ++ s390-ccw-virtio-7.2 ++ s390-ccw-virtio-5.2 ++ s390-ccw-virtio-9.1 ++ s390-ccw-virtio-10.0 ++ s390-ccw-virtio-8.1 ++ s390-ccw-virtio-6.1 ++ s390-ccw-virtio-7.1 ++ s390-ccw-virtio-5.1 ++ s390-ccw-virtio-10.2 ++ s390-ccw-virtio-9.0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 32 ++ /usr/bin/qemu-system-sparc ++ SS-5 ++ SS-20 ++ LX ++ SPARCClassic ++ leon3_generic ++ SPARCbook ++ SS-4 ++ SS-600MP ++ SS-10 ++ Voyager ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-sparc64 ++ sun4u ++ niagara ++ sun4v ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ hvm ++ ++ 64 ++ /usr/bin/qemu-system-x86_64 ++ pc-i440fx-11.0 ++ pc ++ pc-q35-5.2 ++ pc-i440fx-10.2 ++ xenpv ++ pc-i440fx-6.2 ++ pc-i440fx-5.2 ++ pc-q35-9.1 ++ pc-q35-7.1 ++ pc-q35-8.1 ++ pc-q35-11.0 ++ q35 ++ pc-i440fx-8.1 ++ pc-q35-6.1 ++ nitro ++ pc-i440fx-9.1 ++ pc-q35-10.0 ++ pc-i440fx-7.1 ++ x-remote ++ pc-i440fx-10.1 ++ pc-q35-5.1 ++ pc-i440fx-6.1 ++ pc-i440fx-5.1 ++ isapc ++ pc-q35-9.0 ++ pc-q35-10.2 ++ pc-q35-7.0 ++ pc-q35-8.0 ++ pc-i440fx-8.0 ++ pc-q35-6.0 ++ pc-i440fx-9.0 ++ pc-i440fx-7.0 ++ nitro-enclave ++ xenpvh ++ pc-i440fx-10.0 ++ pc-q35-9.2 ++ pc-q35-7.2 ++ pc-i440fx-6.0 ++ xenfv-4.2 ++ microvm ++ pc-q35-8.2 ++ pc-i440fx-8.2 ++ pc-q35-6.2 ++ pc-i440fx-9.2 ++ pc-q35-10.1 ++ pc-i440fx-7.2 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +2.55.0 diff --git a/libvirt-tests-qemuxmlconfdata-provide-HW-accel-smmuv3-sample-XML-and-CLI-args.patch b/libvirt-tests-qemuxmlconfdata-provide-HW-accel-smmuv3-sample-XML-and-CLI-args.patch new file mode 100644 index 0000000..5b29537 --- /dev/null +++ b/libvirt-tests-qemuxmlconfdata-provide-HW-accel-smmuv3-sample-XML-and-CLI-args.patch @@ -0,0 +1,395 @@ +From d07415461c5105075aca563fdc4595df8443a9e1 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Nathan Chen +Date: Wed, 5 Aug 2026 15:13:01 -0700 +Subject: [PATCH] tests: qemuxmlconfdata: provide HW-accel smmuv3 sample XML + and CLI args + +Provide sample XML and CLI args for the HW-accel smmuv3 XML schema +for virt machine types. + +Reviewed-by: Pavel Hrdina +Signed-off-by: Nathan Chen +(cherry picked from commit 6fcebd5bbbc7c31b732b8fe4c8019ced78fce0de) + +Conflicts: + tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.args + tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel.aarch64-latest.args + - missing upstream commit d071782577a83fcd5a8c6730838e853699439f1a + +Resolves: https://redhat.atlassian.net/browse/RHEL-138901 +--- + ...uv3-pci-bus-accel-auto.aarch64-latest.args | 38 +++++++++++ + ...muv3-pci-bus-accel-auto.aarch64-latest.xml | 63 +++++++++++++++++++ + .../iommu-smmuv3-pci-bus-accel-auto.xml | 53 ++++++++++++++++ + ...u-smmuv3-pci-bus-accel.aarch64-latest.args | 38 +++++++++++ + ...mu-smmuv3-pci-bus-accel.aarch64-latest.xml | 63 +++++++++++++++++++ + .../iommu-smmuv3-pci-bus-accel.xml | 53 ++++++++++++++++ + tests/qemuxmlconftest.c | 2 + + 7 files changed, 310 insertions(+) + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.args + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.xml + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.xml + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel.aarch64-latest.args + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel.aarch64-latest.xml + create mode 100644 tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel.xml + +diff --git a/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.args b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.args +new file mode 100644 +index 0000000000..40423e505d +--- /dev/null ++++ b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.args +@@ -0,0 +1,38 @@ ++LC_ALL=C \ ++PATH=/bin \ ++HOME=/var/lib/libvirt/qemu/domain--1-guest \ ++USER=test \ ++LOGNAME=test \ ++XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \ ++XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \ ++XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \ ++/usr/bin/qemu-system-aarch64 \ ++-name guest=guest,debug-threads=on \ ++-S \ ++-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \ ++-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \ ++-accel tcg \ ++-m size=1048576k \ ++-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ ++-overcommit mem-lock=off \ ++-smp 1,sockets=1,cores=1,threads=1 \ ++-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ ++-display none \ ++-no-user-config \ ++-nodefaults \ ++-chardev socket,id=charmonitor,fd=@mon-fd@,server=on,wait=off \ ++-mon chardev=charmonitor,id=monitor,mode=control \ ++-rtc base=utc \ ++-no-shutdown \ ++-boot strict=on \ ++-device '{"driver":"pxb-pcie","bus_nr":252,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \ ++-device '{"driver":"pxb-pcie","bus_nr":248,"id":"pci.2","bus":"pcie.0","addr":"0x2"}' \ ++-device '{"driver":"pcie-root-port","port":0,"chassis":21,"id":"pci.3","bus":"pci.1","addr":"0x0"}' \ ++-device '{"driver":"pcie-root-port","port":168,"chassis":22,"id":"pci.4","bus":"pci.2","addr":"0x0"}' \ ++-device '{"driver":"arm-smmuv3","primary-bus":"pci.1","id":"iommu0","accel":true}' \ ++-device '{"driver":"arm-smmuv3","primary-bus":"pci.2","id":"iommu1","accel":true}' \ ++-audiodev '{"id":"audio1","driver":"none"}' \ ++-device '{"driver":"vfio-pci","host":"0000:06:00.0","id":"hostdev0","bus":"pci.3","addr":"0x0"}' \ ++-device '{"driver":"vfio-pci","host":"0000:06:01.0","id":"hostdev1","bus":"pci.4","addr":"0x0"}' \ ++-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ ++-msg timestamp=on +diff --git a/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.xml b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.xml +new file mode 100644 +index 0000000000..08fb17fb6f +--- /dev/null ++++ b/tests/qemuxmlconfdata/iommu-smmuv3-pci-bus-accel-auto.aarch64-latest.xml +@@ -0,0 +1,63 @@ ++ ++ guest ++ 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 ++ 1048576 ++ 1048576 ++ 1 ++ ++ hvm ++ ++ ++ ++ ++ ++ ++ destroy ++ restart ++ destroy ++ ++ /usr/bin/qemu-system-aarch64 ++ ++ ++ ++ ++ ++
++ ++ ++ ++ ++
++ ++ ++ ++ ++
++ ++ ++ ++ ++
++ ++