On 2/21/26 2:18 AM, Tao Tang wrote:
Add access control for SMMU_STRTAB_BASE and SMMU_CR2 registers to
ensure they can only be modified when the SMMU is disabled.

This implements:
- smmuv3_smmu_disabled_stable(): Check whether the SMMU is in a stable
    disabled state (CR0.SMMUEN == 0 and CR0ACK.SMMUEN == 0);
- smmu_strtab_base_writable(): returns true only when IDR1.TABLES_PRESET==0
    and SMMU is completely disabled.

Additionally, mask reserved bits on writes to SMMU_STRTAB_BASE using
SMMU_STRTAB_BASE_RESERVED.

Fixes: fae4be38b35d ("hw/arm/smmuv3: Implement MMIO write operations")
Signed-off-by: Tao Tang <[email protected]>
---
  hw/arm/smmuv3.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++--
  1 file changed, 67 insertions(+), 2 deletions(-)


Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to