linux/drivers/iommu/arm
Nicolin Chen a50006e7ba iommu/arm-smmu-v3: Do not set disable_ats unless vSTE is Translate
[ Upstream commit a45dd34663 ]

A vSTE may have three configuration types: Abort, Bypass, and Translate.

An Abort vSTE wouldn't enable ATS, but the other two might.

It makes sense for a Transalte vSTE to rely on the guest vSTE.EATS field.

For a Bypass vSTE, it would end up with an S2-only physical STE, similar
to an attachment to a regular S2 domain. However, the nested case always
disables ATS following the Bypass vSTE, while the regular S2 case always
enables ATS so long as arm_smmu_ats_supported(master) == true.

Note that ATS is needed for certain VM centric workloads and historically
non-vSMMU cases have relied on this automatic enablement. So, having the
nested case behave differently causes problems.

To fix that, add a condition to disable_ats, so that it might enable ATS
for a Bypass vSTE, aligning with the regular S2 case.

Fixes: f27298a82b ("iommu/arm-smmu-v3: Allow ATS for IOMMU_DOMAIN_NESTED")
Cc: stable@vger.kernel.org
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:21:14 -05:00
..
arm-smmu iommu/arm-smmu-qcom: do not register driver in probe() 2026-02-19 16:31:36 +01:00
arm-smmu-v3 iommu/arm-smmu-v3: Do not set disable_ats unless vSTE is Translate 2026-03-04 07:21:14 -05:00
Kconfig iommu: Split out and tidy up Arm Kconfig 2025-04-17 16:34:00 +02:00
Makefile Revert "iommu: make inclusion of arm/arm-smmu-v3 directory conditional" 2025-05-31 07:43:16 -07:00