Home
last modified time | relevance | path

Searched hist:be7c90de39fdebdba4f9cce7575b71c6b2506ea0 (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/iommu/arm/arm-smmu-v3/
H A Darm-smmu-v3.cdiff be7c90de39fdebdba4f9cce7575b71c6b2506ea0 Tue Jun 25 14:37:37 CEST 2024 Jason Gunthorpe <jgg@nvidia.com> iommu/arm-smmu-v3: Do not use master->sva_enable to restrict attaches

We no longer need a master->sva_enable to control what attaches are
allowed. Instead we can tell if the attach is legal based on the current
configuration of the master.

Keep track of the number of valid CD entries for SSID's in the cd_table
and if the cd_table has been installed in the STE directly so we know what
the configuration is.

The attach logic is then made into:
- SVA bind, check if the CD is installed
- RID attach of S2, block if SSIDs are used
- RID attach of IDENTITY/BLOCKING, block if SSIDs are used

arm_smmu_set_pasid() is already checking if it is possible to setup a CD
entry, at this patch it means the RID path already set a STE pointing at
the CD table.

Tested-by: Nicolin Chen <nicolinc@nvidia.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/6-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>