]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/arm-smmu-v3: Do not set disable_ats unless vSTE is Translate
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 15 Jan 2026 01:12:43 +0000 (17:12 -0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:14 +0000 (07:21 -0500)
commita50006e7ba0e31b49a00a3d4fef89161298f866e
treec1745f8cd666775b5365f013bc1120e17ee4a7fe
parent779e0c250a6b8a0a2c1e2f39bedfb159100d113d
iommu/arm-smmu-v3: Do not set disable_ats unless vSTE is Translate

[ Upstream commit a45dd34663025c75652b27e384e91c9c05ba1d80 ]

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: f27298a82ba0 ("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>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c