iommu/arm-smmu-v3: Keep track of arm_smmu_master_domain for SVA
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 25 Jun 2024 12:37:40 +0000 (09:37 -0300)
committerWill Deacon <will@kernel.org>
Tue, 2 Jul 2024 14:39:47 +0000 (15:39 +0100)
commit49db2ed23c52f8371c12ab8646df23fa1daad4b2
treebe3b643979d3dd0618604940d5e98bfab948d810
parentd7b2d2ba1b84f4ae7cd94de22f74d6c6c5419de6
iommu/arm-smmu-v3: Keep track of arm_smmu_master_domain for SVA

Fill in the smmu_domain->devices list in the new struct arm_smmu_domain
that SVA allocates. Keep track of every SSID and master that is using the
domain reusing the logic for the RID attach.

This is the first step to making the SVA invalidation follow the same
design as S1/S2 invalidation. At present nothing will read this list.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/9-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c