On 8/13/2026 9:25 AM, Tao Tang wrote:
> To prevent aliasing between translations controlled through the Secure and
> Non-secure programming interfaces, the IOTLB lookup key must incorporate
> SEC_SID.
> 
> This commit:
> - expands SMMUIOTLBKey with SEC_SID field for cache key differentiation
> - extends SMMUIOTLBPageInvInfo with SEC_SID for invalidation filtering
> - updates all IOTLB invalidation helpers (smmu_iotlb_inv_iova,
>   smmu_iotlb_inv_ipa, smmu_iotlb_inv_asid_vmid, smmu_iotlb_inv_vmid,
>   smmu_iotlb_inv_vmid_s1) to accept and filter by SEC_SID
> - plumbs SEC_SID through smmuv3_range_inval for TLB invalidation
> - enhances trace events to include SEC_SID for better debugging
> 
> This ensures that IOTLB entries decoded through the Secure and Non-secure
> programming interfaces are distinct, preventing cache aliasing across
> SEC_SID namespaces.
> 
> Signed-off-by: Tao Tang <[email protected]>
> ---
>  hw/arm/smmu-common.c         | 110 +++++++++++++++++++++++------------
>  hw/arm/smmu-internal.h       |   2 +
>  hw/arm/smmuv3.c              |  47 ++++++++++-----
>  hw/arm/trace-events          |  20 +++----
>  include/hw/arm/smmu-common.h |  32 +++++++---
>  5 files changed, 140 insertions(+), 71 deletions(-)
> 

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


Reply via email to