From: Nathan Chen <nathanc@nvidia.com>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Yi Liu" <yi.l.liu@intel.com>,
"Eric Auger" <eric.auger@redhat.com>,
"Zhenzhong Duan" <zhenzhong.duan@intel.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Alex Williamson" <alex@shazbot.org>,
"Cédric Le Goater" <clg@redhat.com>,
"Shameer Kolothum" <skolothumtho@nvidia.com>,
"Matt Ochs" <mochs@nvidia.com>,
"Nicolin Chen" <nicolinc@nvidia.com>,
"Nathan Chen" <nathanc@nvidia.com>
Subject: [PATCH 00/11] hw/arm/smmuv3-accel: Resolve AUTO properties
Date: Tue, 31 Mar 2026 18:02:20 -0700 [thread overview]
Message-ID: <20260401010231.4166776-1-nathanc@nvidia.com> (raw)
Hi,
This series introduces support for resolving 'auto' for arm-smmuv3
accelerated mode's ATS, RIL, SSIDSIZE, and OAS feature properties
based on host IOMMU capabilities. This is dependent on the series [1]
for changing these property types to accept 'auto' values.
Accelerated SMMUv3 Address Translation Services support is derived
from IDR0, Range Invalidation support is derived from IDR3, Substream
ID size is derived from IDR1, and output address space is derived from
IDR5.
Additionally, an OnOffAuto "ats" property is added for vfio-pci devices,
where setting 'auto' detects the per-device presence of
IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED from the kernel, and the ATS cap can
be advertised or hidden by setting 'on' or 'off'. This is dependent
on Shameer's recent kernel series for reporting effective ATS support
status [2].
The default values are set to 'auto' for all properties.
A complete branch can be found here:
https://github.com/NathanChenNVIDIA/qemu/tree/smmuv3-accel-auto-resolve
Please take a look and let me know your feedback.
Thanks,
Nathan
[0] https://lore.kernel.org/qemu-devel/20260309192119.870186-1-nathanc@nvidia.com/
[1] https://lore.kernel.org/qemu-arm/20260323182454.1416110-1-nathanc@nvidia.com/
[2] https://lore.kernel.org/all/20260317111603.101456-1-skolothumtho@nvidia.com/
Example usage:
qemu-system-aarch64 \
-object iommufd,id=iommufd0 \
-machine virt,accel=kvm,gic-version=3,ras=on,highmem-mmio-size=4T \
-cpu host -smp cpus=4 -m size=16G -nographic \
-object memory-backend-ram,size=16G,id=m0 \
-numa node,memdev=m0,cpus=0-3,nodeid=0 \
-numa node,nodeid=1 -numa node,nodeid=2 -numa node,nodeid=3 -numa node,nodeid=4 \
-numa node,nodeid=5 -numa node,nodeid=6 -numa node,nodeid=7 -numa node,nodeid=8 \
-device pxb-pcie,id=pcie.1,bus_nr=1,bus=pcie.0,numa_node=0 \
-device arm-smmuv3,primary-bus=pcie.1,id=smmuv3.1,accel=on,ats=auto,ssidsize=auto,ril=auto,oas=auto \
-device pcie-root-port,id=pcie.port1,bus=pcie.1,chassis=1,io-reserve=0 \
-device vfio-pci-nohotplug,host=0009:06:00.0,bus=pcie.port1,rombar=0,id=dev0,iommufd=iommufd0,ats=auto \
-object acpi-generic-initiator,id=gi0,pci-dev=dev0,node=1 \
-object acpi-generic-initiator,id=gi1,pci-dev=dev0,node=2 \
-object acpi-generic-initiator,id=gi2,pci-dev=dev0,node=3 \
-object acpi-generic-initiator,id=gi3,pci-dev=dev0,node=4 \
-object acpi-generic-initiator,id=gi4,pci-dev=dev0,node=5 \
-object acpi-generic-initiator,id=gi5,pci-dev=dev0,node=6 \
-object acpi-generic-initiator,id=gi6,pci-dev=dev0,node=7 \
-object acpi-generic-initiator,id=gi7,pci-dev=dev0,node=8 \
-bios /usr/share/AAVMF/AAVMF_CODE.fd \
-device nvme,drive=nvme0,serial=deadbeaf1,bus=pcie.0 \
-drive file=/var/lib/libvirt/images/guest.qcow2,index=0,media=disk,format=qcow2,if=none,id=nvme0 \
-device e1000,romfile=/usr/local/share/qemu/efi-e1000.rom,netdev=net0,bus=pcie.0 \
-netdev user,id=net0,hostfwd=tcp::5558-:22,hostfwd=tcp::5586-:5586
Testing:
Basic sanity testing was performed on an NVIDIA Grace platform with GPU
device assignment and running CUDA test apps on the guest. Observed the
feature properties being set based on host IOMMU capabilities and the
ATS capability for a vfio-pci device reported based on what was reported
from the host. Verified that the VM boot will fail without a cold-plugged
device, and that a hot-plugged device re-uses the resolved values from
the initial cold-plug. Additional testing and feedback are welcome.
Nathan Chen (11):
hw/arm/smmuv3-accel: Add helper for resolving auto parameters
hw/arm/smmuv3-accel: Implement "auto" value for "ats"
hw/arm/smmuv3: Change the default ats support to match the host
vfio/pci: Add ats property and mask ATS cap when not exposed
hw/arm/smmuv3-accel: Implement "auto" value for "ril"
hw/arm/smmuv3: Change the default ril support to match the host
hw/arm/smmuv3-accel: Implement "auto" value for "ssidsize"
hw/arm/smmuv3: Change the default ssidsize to match the host
hw/arm/smmuv3-accel: Implement "auto" value for "oas"
hw/arm/smmuv3: Change the default oas to match the host
qemu-options.hx: Support "auto" for accel SMMUv3 properties
backends/iommufd.c | 15 +++++++
hw/arm/smmuv3-accel.c | 50 +++++++++++++++++++++++-
hw/arm/smmuv3-accel.h | 2 +
hw/arm/smmuv3.c | 61 +++++++++++++++++------------
hw/core/machine.c | 8 ++++
hw/vfio/pci.c | 63 ++++++++++++++++++++++++++++++
hw/vfio/pci.h | 1 +
include/hw/arm/smmuv3.h | 2 +
include/system/host_iommu_device.h | 10 +++++
qemu-options.hx | 1 -
10 files changed, 185 insertions(+), 28 deletions(-)
--
2.43.0
next reply other threads:[~2026-04-01 1:02 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 1:02 Nathan Chen [this message]
2026-04-01 1:02 ` [PATCH 01/11] hw/arm/smmuv3-accel: Add helper for resolving auto parameters Nathan Chen
2026-04-10 7:26 ` Eric Auger
2026-04-10 18:50 ` Nathan Chen
2026-04-10 7:37 ` Eric Auger
2026-04-10 18:53 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 02/11] hw/arm/smmuv3-accel: Implement "auto" value for "ats" Nathan Chen
2026-04-10 7:36 ` Eric Auger
2026-04-10 18:53 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 03/11] hw/arm/smmuv3: Change the default ats support to match the host Nathan Chen
2026-04-10 7:42 ` Eric Auger
2026-04-10 18:54 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 04/11] vfio/pci: Add ats property and mask ATS cap when not exposed Nathan Chen
2026-04-10 21:09 ` Cédric Le Goater
2026-04-11 1:52 ` Nathan Chen
2026-04-11 12:45 ` Cédric Le Goater
2026-04-13 19:11 ` Nathan Chen
2026-04-16 13:58 ` Cédric Le Goater
2026-04-16 20:04 ` Nathan Chen
2026-04-16 13:43 ` Shameer Kolothum Thodi
2026-04-16 21:39 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 05/11] hw/arm/smmuv3-accel: Implement "auto" value for "ril" Nathan Chen
2026-04-10 7:47 ` Eric Auger
2026-04-10 18:58 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 06/11] hw/arm/smmuv3: Change the default ril support to match the host Nathan Chen
2026-04-10 7:41 ` Eric Auger
2026-04-10 18:59 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 07/11] hw/arm/smmuv3-accel: Implement "auto" value for "ssidsize" Nathan Chen
2026-04-10 7:56 ` Eric Auger
2026-04-10 19:01 ` Nathan Chen
2026-04-01 1:02 ` [PATCH 08/11] hw/arm/smmuv3: Change the default ssidsize to match the host Nathan Chen
2026-04-01 1:02 ` [PATCH 09/11] hw/arm/smmuv3-accel: Implement "auto" value for "oas" Nathan Chen
2026-04-10 7:48 ` Eric Auger
2026-04-16 14:08 ` Shameer Kolothum Thodi
2026-04-16 20:02 ` Nathan Chen
2026-04-20 22:31 ` Nathan Chen
2026-04-21 9:30 ` Shameer Kolothum Thodi
2026-04-01 1:02 ` [PATCH 10/11] hw/arm/smmuv3: Change the default oas to match the host Nathan Chen
2026-04-01 1:02 ` [PATCH 11/11] qemu-options.hx: Support "auto" for accel SMMUv3 properties Nathan Chen
2026-04-16 14:19 ` Shameer Kolothum Thodi
2026-04-16 19:54 ` Nathan Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401010231.4166776-1-nathanc@nvidia.com \
--to=nathanc@nvidia.com \
--cc=alex@shazbot.org \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mochs@nvidia.com \
--cc=nicolinc@nvidia.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=skolothumtho@nvidia.com \
--cc=wangyanan55@huawei.com \
--cc=yi.l.liu@intel.com \
--cc=zhao1.liu@intel.com \
--cc=zhenzhong.duan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.