On 3/18/2026 2:51 AM, Shameer Kolothum Thodi wrote:
-----Original Message-----
From: Nathan Chen<[email protected]>
Sent: 17 March 2026 18:38
To:[email protected];[email protected]
Cc: Eric Auger<[email protected]>; Peter Maydell
<[email protected]>; Shannon Zhao<[email protected]>;
Michael S . Tsirkin<[email protected]>; Igor Mammedov
<[email protected]>; Ani Sinha<[email protected]>; Paolo Bonzini
<[email protected]>; Daniel P . Berrangé<[email protected]>; Eric
Blake<[email protected]>; Markus Armbruster<[email protected]>;
Shameer Kolothum Thodi<[email protected]>; Matt Ochs
<[email protected]>; Nicolin Chen<[email protected]>; Nathan Chen
<[email protected]>
Subject: [PATCH v3 7/8] hw/arm/smmuv3-accel: Change OAS property to
OasMode
From: Nathan Chen<[email protected]>
Change accel SMMUv3 OAS property from uint8_t to OasMode. The
'auto' value is not implemented, as this commit is meant to
set the property to the correct type and avoid breaking JSON/QMP
when the auto mode is introduced. A future patch will implement
resolution of 'auto' value to match the host SMMUv3 OAS value.
Fixes: a015ac990fd3 ("hw/arm/smmuv3-accel: Add property to specify OAS
bits")
Signed-off-by: Nathan Chen<[email protected]>
---
hw/arm/smmuv3-accel.c | 2 +-
hw/arm/smmuv3.c | 6 +++---
include/hw/arm/smmuv3.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c
index c90fa9f5bb..08a4e2a1c8 100644
--- a/hw/arm/smmuv3-accel.c
+++ b/hw/arm/smmuv3-accel.c
@@ -850,7 +850,7 @@ void smmuv3_accel_idr_override(SMMUv3State *s)
}
/* Advertise 48-bit OAS in IDR5 when requested (default is 44 bits). */
- if (s->oas == SMMU_OAS_48BIT) {
+ if (s->oas == OAS_MODE_48) {
s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS_48);
}
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index e7fec7a69e..5b85247606 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1981,7 +1981,7 @@ static bool
smmu_validate_property(SMMUv3State *s, Error **errp)
error_setg(errp, "ats can only be enabled if accel=on");
return false;
}
- if (s->oas != SMMU_OAS_44BIT) {
+ if (s->oas > OAS_MODE_44) {
error_setg(errp, "OAS must be 44 bits when accel=off");
return false;
}
@@ -2014,7 +2014,7 @@ static bool
smmu_validate_property(SMMUv3State *s, Error **errp)
return false;
}
- if (s->oas != SMMU_OAS_44BIT && s->oas != SMMU_OAS_48BIT) {
+ if (s->oas != OAS_MODE_44 && s->oas != OAS_MODE_48) {
Same here. We can get rid of SMMU_OAS_44BIT/_48BIT defines.
Right, I will remove the SMMU_OAS_44BIT/_48BIT and SMMU_SSID_MAX_BITS
defines.
Thanks,
Nathan