Commit 665f1a0904 for qemu.org
commit 665f1a0904a386588e2ed4aa35cef88c29e762a5
Merge: 255745b9ad 8de1ba58af
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Wed Jun 17 10:17:03 2026 -0400
Merge tag 'pull-target-arm-20260616' of https://gitlab.com/pm215/qemu into staging
target-arm queue:
* Implementation of various insns preparatory to FEAT_SVE2p2
* hw/arm/smmuv3: Make smmuv3 ATS, RIL, SSIDSIZE, and OAS 'auto' properties work
* hw/pci/pci: Enforce pci_setup_iommu_per_bus() is called only once per bus
* hw/arm/virt: Introduce Tegra241 CMDQV support for accelerated SMMUv3
* target/arm: honour CCR.BFHFNMIGN for probed data BusFaults
* hw/arm/bcm2838: Route I2C interrupts to GIC
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmoxnm0ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3pkwEACvFoqnwXHW7hrRI8LneG38
# uAhRJmyUmuzCFFDL7AF9//eJFL37GuFWekifyzoaQdq3Agwh0rhjH1DXWK1jLCaV
# jyidDrdZt7dn7VIgxUbfq9618kHtN16wvCJ1Dvi8YVqShpAKeXWTEj006qujiEth
# oRqcHVzu2OeYNEw2wlf9jBWjk8j4Pq9PIho2qC2hALB95zFYjOu4aTcPO0sKnFu/
# DwBQyKPTuO+u7uiv4f12CoRQ1PxsSbpObLARmkaQXlwbKVddgHC0PyZDGKN4jRIy
# 7w6A4JTEAnkk5btyPkNSm+iRonBnqrVbWOS7s4sOqQB6T6vCKtFIPh4jpL6Lt0ub
# BExwssYLGc/YXkHPUEbxwiV8/8lKkJy89JRUN33HEyDU4N5SiMDElUF5tpXIWK58
# hT25QdARNILK0zahGaVhgzmX3tlBuFn/HeHZAJcRL1xLbbvvGNoNJaGHVU5jlbet
# 07191qquh6oVW43vWbg+LuspIYgvdzJWoZ32zVn1ZGH+9+Au3+6K60dMDRA/JLXW
# bpdF3ClvQHx34dHw8aVPbkh8Vbnz2C0R7jYTlvvQL5ibHX2jCeCdi6bt3gsZLGMB
# j1AX+1MkYKttmfp7HubPkwR/p4VxHJB/MP8XL/oQNTjJGR4/C5qF7xdY3UO0JiaM
# Eg0Fyw94SNW7nzziYAYF+A==
# =rqLU
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 16 Jun 2026 15:05:17 EDT
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full]
# gpg: aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* tag 'pull-target-arm-20260616' of https://gitlab.com/pm215/qemu: (61 commits)
target/arm: Implement floating-point log and convert to integer (zeroing)
target/arm: Implement SVE floating-point convert (top, predicated, zeroing)
target/arm: Enable zeroing in DO_FCVT{N, L}T macros in sve_helper.c
target/arm: Implement FRINT{32,64}{X,Z}
target/arm: Implement SCVTF, UCVTF (predicated, zeroing)
target/arm: Implement Floating-point square root (predicated, zeroing)
target/arm: Implement Floating-point convert (predicated, zeroing)
target/arm: Implement Floating-point round to integral value (predicated, zeroing)
target/arm: Add data argument to do_frint_mode
target/arm: Implement SVE2 integer unary operations (predicated, zeroing)
target/arm: Implement SVE reverse doublewords (zeroing)
target/arm: Implement SVE reverse within elements (zeroing)
target/arm: Implement SVE bitwise unary operations (predicated, zeroing)
target/arm: Implement SVE integer unary operations (predicated, zeroing)
target/arm: Expand DO_ZPZ in translate-sve.c
target/arm: Enable zeroing in DO_ZPZ macros in sve_helper.c
target/arm: Rename sve unary predicated patterns
target/arm: Add feature predicates for SVE2.2 and SME2.2
hw/arm/bcm2838: Route I2C interrupts to GIC
target/arm: honour CCR.BFHFNMIGN for probed data BusFaults
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --cc backends/iommufd.c
index cfde6f2b2c,440c1b82bc..09624cd652
--- a/backends/iommufd.c
+++ b/backends/iommufd.c
@@@ -538,9 -549,61 +549,62 @@@ bool iommufd_backend_alloc_veventq(IOMM
return true;
}
+ bool iommufd_backend_alloc_hw_queue(IOMMUFDBackend *be, uint32_t viommu_id,
+ uint32_t queue_type, uint32_t index,
+ uint64_t addr, uint64_t length,
+ uint32_t *out_hw_queue_id, Error **errp)
+ {
+ int ret;
+ struct iommu_hw_queue_alloc alloc_hw_queue = {
+ .size = sizeof(alloc_hw_queue),
+ .flags = 0,
+ .viommu_id = viommu_id,
+ .type = queue_type,
+ .index = index,
+ .nesting_parent_iova = addr,
+ .length = length,
+ };
+
+ ret = ioctl(be->fd, IOMMU_HW_QUEUE_ALLOC, &alloc_hw_queue);
+
+ trace_iommufd_backend_alloc_hw_queue(be->fd, viommu_id, queue_type,
+ index, addr, length,
+ alloc_hw_queue.out_hw_queue_id, ret);
+ if (ret) {
+ error_setg_errno(errp, errno, "IOMMU_HW_QUEUE_ALLOC failed");
+ return false;
+ }
+
+ g_assert(out_hw_queue_id);
+ *out_hw_queue_id = alloc_hw_queue.out_hw_queue_id;
+ return true;
+ }
+
+ /*
+ * Helper to mmap HW MMIO regions exposed via iommufd for a vIOMMU instance.
+ * The caller is responsible for unmapping the mapped region.
+ */
+ bool iommufd_backend_viommu_mmap(IOMMUFDBackend *be, uint32_t viommu_id,
+ uint64_t size, off_t offset, void **out_ptr,
+ Error **errp)
+ {
+ g_assert(viommu_id);
+ g_assert(out_ptr);
+
+ *out_ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, be->fd,
+ offset);
+ trace_iommufd_backend_viommu_mmap(be->fd, viommu_id, size, offset);
+ if (*out_ptr == MAP_FAILED) {
+ error_setg_errno(errp, errno, "IOMMUFD vIOMMU mmap failed");
+ return false;
+ }
+
+ return true;
+ }
+
bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,
- uint32_t hwpt_id, Error **errp)
+ uint32_t pasid, uint32_t hwpt_id,
+ Error **errp)
{
HostIOMMUDeviceIOMMUFDClass *hiodic =
HOST_IOMMU_DEVICE_IOMMUFD_GET_CLASS(hiodi);