diff options
| author | Mostafa Saleh <smostafa@google.com> | 2026-09-24 08:56:12 +0000 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-10-02 15:48:09 +0000 |
| commit | 84366fb547ed987c4857311da0e5127d95bf97e6 (patch) | |
| tree | 75c5acc5fedb6cbe57c1f093747edf508ce66b67 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 3f9fa6b9520d69c0fd400b0c260320c0a8a1500c (diff) | |
iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs
Commit 6fabce53f6b9 ("iommu/arm-smmu-v3: Add a missing dma_wmb() for hitless STE update")
adds a dma_wmb() to arm_smmu_write_entry() to make sure stream tables
and context descriptors are observed first.
However, STE L1 table descriptors are configured directly
via WRITE_ONCE(), where before that they were zeroed with memset()
inside dma_direct_alloc() then written to abort in via memset() also
in arm_smmu_init_initial_stes() without a barrier in both cases which
means that the SMMUv3 can observe the allocated table before the
written descriptors causing it to fetch random data.
Similarly in arm_smmu_write_cd_l1_desc() where the L1 CD is written
after dma_alloc_coherent() with no barriers.
Add dma_wmb() in both cases.
Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices")
Reported-by: Sashiko <>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
