From: Nathan Chen <nathanc@nvidia.com>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Eric Auger" <eric.auger@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Zhao Liu" <zhao1.liu@intel.com>, "Matt Ochs" <mochs@nvidia.com>,
"Nicolin Chen" <nicolinc@nvidia.com>,
"Shameer Kolothum" <skolothumtho@nvidia.com>,
"Nathan Chen" <nathanc@nvidia.com>
Subject: [PATCH v3 6/7] hw/arm/smmuv3: Set default ats, ril, ssidsize, oas to auto
Date: Tue, 12 May 2026 12:35:19 -0700 [thread overview]
Message-ID: <20260512193520.3109172-7-nathanc@nvidia.com> (raw)
In-Reply-To: <20260512193520.3109172-1-nathanc@nvidia.com>
From: Nathan Chen <nathanc@nvidia.com>
Set the default value of ATS, RIL, SSIDSIZE, and OAS to auto, in order
to match the host IOMMU properties when accel=on.
If accel=off and these property values are set to auto, the default
property values defined in smmuv3_init_id_regs() for OAS and RIL will
remain unchanged, while SSIDSIZE and ATS values will remain initialized
at 0.
Introduce a new compat for the changed defaults.
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
---
hw/arm/smmuv3.c | 23 +++++++++++++++--------
hw/core/machine.c | 5 +++++
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 31c2eec2f4..665e6a2538 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -2129,12 +2129,19 @@ static const Property smmuv3_properties[] = {
DEFINE_PROP_BOOL("accel", SMMUv3State, accel, false),
/* GPA of MSI doorbell, for SMMUv3 accel use. */
DEFINE_PROP_UINT64("msi-gpa", SMMUv3State, msi_gpa, 0),
+ /*
+ * AUTO values for accel=off will resolve to:
+ * ril: on
+ * ats: off
+ * oas: 44
+ * ssidsize: 0
+ */
/* RIL can be turned off for accel cases */
- DEFINE_PROP_ON_OFF_AUTO("ril", SMMUv3State, ril, ON_OFF_AUTO_ON),
- DEFINE_PROP_ON_OFF_AUTO("ats", SMMUv3State, ats, ON_OFF_AUTO_OFF),
- DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_44),
+ DEFINE_PROP_ON_OFF_AUTO("ril", SMMUv3State, ril, ON_OFF_AUTO_AUTO),
+ DEFINE_PROP_ON_OFF_AUTO("ats", SMMUv3State, ats, ON_OFF_AUTO_AUTO),
+ DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_AUTO),
DEFINE_PROP_SSIDSIZE_MODE("ssidsize", SMMUv3State, ssidsize,
- SSID_SIZE_MODE_0),
+ SSID_SIZE_MODE_AUTO),
};
static void smmuv3_instance_init(Object *obj)
@@ -2162,20 +2169,20 @@ static void smmuv3_class_init(ObjectClass *klass, const void *data)
"configured in nested mode for vfio-pci dev assignment");
object_class_property_set_description(klass, "ril",
"Enable/disable range invalidation support (for accel=on). "
- "Valid values are on, off, and auto. Defaults to 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.");
object_class_property_set_description(klass, "ats",
"Enable/disable ATS support (for accel=on). "
- "Valid values are on, off, and auto. Defaults to off. "
+ "Valid values are on, off, and auto. Defaults to auto. "
"Please ensure host platform supports ATS before setting it "
"to on.");
object_class_property_set_description(klass, "oas",
"Set Output Address Size in bits (for accel=on). "
- "Valid values are 44, 48, and auto. Defaults to 44 bits.");
+ "Valid values are 44, 48, and auto. Defaults to auto.");
object_class_property_set_description(klass, "ssidsize",
"Set number of bits used to represent SubstreamIDs (SSIDs). "
- "Valid values are 0-20 and auto. Defaults to 0. "
+ "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.");
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 63baff859f..3339da99ee 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -38,9 +38,14 @@
#include "hw/virtio/virtio-iommu.h"
#include "hw/acpi/generic_event_device.h"
#include "qemu/audio.h"
+#include "hw/arm/smmuv3.h"
GlobalProperty hw_compat_11_0[] = {
{ "chardev-vc", "encoding", "cp437" },
+ { TYPE_ARM_SMMUV3, "ats", "off" },
+ { TYPE_ARM_SMMUV3, "ril", "on" },
+ { TYPE_ARM_SMMUV3, "ssidsize", "0" },
+ { TYPE_ARM_SMMUV3, "oas", "44" },
};
const size_t hw_compat_11_0_len = G_N_ELEMENTS(hw_compat_11_0);
--
2.43.0
next prev parent reply other threads:[~2026-05-12 19:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 19:35 [PATCH v3 0/7] hw/arm/smmuv3-accel: Resolve AUTO properties Nathan Chen
2026-05-12 19:35 ` [PATCH v3 1/7] hw/arm/smmuv3-accel: Add helper for resolving auto parameters Nathan Chen
2026-05-14 13:41 ` Shameer Kolothum Thodi
2026-05-14 17:58 ` Nathan Chen
2026-05-12 19:35 ` [PATCH v3 2/7] hw/arm/smmuv3-accel: Implement "auto" value for "ats" Nathan Chen
2026-05-14 14:11 ` Shameer Kolothum Thodi
2026-05-14 20:06 ` Nathan Chen
2026-05-15 7:55 ` Shameer Kolothum Thodi
2026-05-12 19:35 ` [PATCH v3 3/7] hw/arm/smmuv3-accel: Implement "auto" value for "ril" Nathan Chen
2026-05-14 14:15 ` Shameer Kolothum Thodi
2026-05-12 19:35 ` [PATCH v3 4/7] hw/arm/smmuv3-accel: Implement "auto" value for "ssidsize" Nathan Chen
2026-05-14 14:24 ` Shameer Kolothum Thodi
2026-05-14 20:14 ` Nathan Chen
2026-05-12 19:35 ` [PATCH v3 5/7] hw/arm/smmuv3-accel: Implement "auto" value for "oas" Nathan Chen
2026-05-14 15:11 ` Shameer Kolothum Thodi
2026-05-12 19:35 ` Nathan Chen [this message]
2026-05-14 15:45 ` [PATCH v3 6/7] hw/arm/smmuv3: Set default ats, ril, ssidsize, oas to auto Shameer Kolothum Thodi
2026-05-12 19:35 ` [PATCH v3 7/7] qemu-options.hx: Support "auto" for accel SMMUv3 properties Nathan Chen
2026-05-14 16:19 ` Shameer Kolothum Thodi
2026-05-14 17:53 ` Nathan Chen
2026-05-14 16:37 ` [PATCH v3 0/7] hw/arm/smmuv3-accel: Resolve AUTO properties Shameer Kolothum Thodi
2026-05-14 17:51 ` 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=20260512193520.3109172-7-nathanc@nvidia.com \
--to=nathanc@nvidia.com \
--cc=eric.auger@redhat.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=zhao1.liu@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.