]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iommu/arm-smmu-v3: Check for SVA features
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Fri, 18 Sep 2020 10:18:50 +0000 (12:18 +0200)
committerWill Deacon <will@kernel.org>
Mon, 28 Sep 2020 22:48:06 +0000 (23:48 +0100)
commitd744f9e6c222c8086376bc56c86e4380595350bd
tree7d321bd8985731609a9733e8cfa299bb230674a9
parent3e63033675c9b1e79b14655481a8c4ecaf23821f
iommu/arm-smmu-v3: Check for SVA features

Aggregate all sanity-checks for sharing CPU page tables with the SMMU
under a single ARM_SMMU_FEAT_SVA bit. For PCIe SVA, users also need to
check FEAT_ATS and FEAT_PRI. For platform SVA, they will have to check
FEAT_STALLS.

Introduce ARM_SMMU_FEAT_BTM (Broadcast TLB Maintenance), but don't
enable it at the moment. Since the entire VMID space is shared with the
CPU, enabling DVM (by clearing SMMU_CR2.PTM) could result in
over-invalidation and affect performance of stage-2 mappings.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20200918101852.582559-11-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h