hw/arm/smmuv3: Set default ats, ril, ssidsize, oas to auto
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. Reviewed-by: Shameer Kolothum <skolothumtho@nvidia.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Nathan Chen <nathanc@nvidia.com> Tested-by: Eric Auger <eric.auger@redhat.com> Message-id: 20260608174900.2227340-9-nathanc@nvidia.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Nathan Chen committed
Jun 8, 2026 at 10:48 UTC
e61f8d1138aa0f702632723f14161da8288936d4
2 files changed
+20
-8
hw/arm/smmuv3.c
+15
-8
@@ -2129,12 +2129,19 @@ static const Property smmuv3_properties[] = {
2129
DEFINE_PROP_BOOL("accel", SMMUv3State, accel, false),
2130
/* GPA of MSI doorbell, for SMMUv3 accel use. */
2131
DEFINE_PROP_UINT64("msi-gpa", SMMUv3State, msi_gpa, 0),
2132
+ /*
2133
+ * AUTO values for accel=off will resolve to:
2134
+ * ril: on
2135
+ * ats: off
2136
+ * oas: 44
2137
+ * ssidsize: 0
2138
+ */
2139
/* RIL can be turned off for accel cases */
2133
- DEFINE_PROP_ON_OFF_AUTO("ril", SMMUv3State, ril, ON_OFF_AUTO_ON),
2134
- DEFINE_PROP_ON_OFF_AUTO("ats", SMMUv3State, ats, ON_OFF_AUTO_OFF),
2135
- DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_44),
2140
+ DEFINE_PROP_ON_OFF_AUTO("ril", SMMUv3State, ril, ON_OFF_AUTO_AUTO),
2141
+ DEFINE_PROP_ON_OFF_AUTO("ats", SMMUv3State, ats, ON_OFF_AUTO_AUTO),
2142
+ DEFINE_PROP_OAS_MODE("oas", SMMUv3State, oas, OAS_MODE_AUTO),
2143
DEFINE_PROP_SSIDSIZE_MODE("ssidsize", SMMUv3State, ssidsize,
2137
- SSID_SIZE_MODE_0),
2144
+ SSID_SIZE_MODE_AUTO),
2145
};
2146
2147
static void smmuv3_instance_init(Object *obj)
@@ -2164,22 +2171,22 @@ static void smmuv3_class_init(ObjectClass *klass, const void *data)
2171
"enabling.");
2172
object_class_property_set_description(klass, "ril",
2173
"Enable/disable range invalidation support (for accel=on). "
2167
- "Valid values are on, off, and auto. Defaults to on. "
2174
+ "Valid values are on, off, and auto. Defaults to auto. "
2175
"Any attempt to turn it 'on' while the host does not support "
2176
"it would fail.");
2177
object_class_property_set_description(klass, "ats",
2178
"Enable/disable ATS support (for accel=on). "
2172
- "Valid values are on, off, and auto. Defaults to off. "
2179
+ "Valid values are on, off, and auto. Defaults to auto. "
2180
"Please ensure host platform supports ATS before setting it "
2181
"to on.");
2182
object_class_property_set_description(klass, "oas",
2183
"Set Output Address Size in bits (for accel=on). "
2177
- "Valid values are 44, 48, and auto. Defaults to 44 bits."
2184
+ "Valid values are 44, 48, and auto. Defaults to auto."
2185
"Please ensure the value does not exceed the maximum "
2186
"Output Address Size supported by the host platform.");
2187
object_class_property_set_description(klass, "ssidsize",
2188
"Set number of bits used to represent SubstreamIDs (SSIDs). "
2182
- "Valid values are 0-20 and auto. Defaults to 0. "
2189
+ "Valid values are 0-20 and auto. Defaults to auto. "
2190
"A value of N allows SSIDs in the range [0 .. 2^N - 1]. "
2191
"A value of 0 disables SubstreamID support. A value greater "
2192
"than 0 is required to enable PASID support."
hw/core/machine.c
+5
@@ -38,11 +38,16 @@
38
#include "hw/virtio/virtio-iommu.h"
39
#include "hw/acpi/generic_event_device.h"
40
#include "qemu/audio.h"
41
+#include "hw/arm/smmuv3.h"
42
43
GlobalProperty hw_compat_11_0[] = {
44
{ "chardev-vc", "encoding", "cp437" },
45
{ "tpm-crb", "cap-chunk", "off" },
46
{ "tpm-crb", "x-allow-chunk-migration", "off" },
47
+ { TYPE_ARM_SMMUV3, "ats", "off" },
48
+ { TYPE_ARM_SMMUV3, "ril", "on" },
49
+ { TYPE_ARM_SMMUV3, "ssidsize", "0" },
50
+ { TYPE_ARM_SMMUV3, "oas", "44" },
51
};
52
const size_t hw_compat_11_0_len = G_N_ELEMENTS(hw_compat_11_0);
53