Skip to contentSkip to conversation

iommu/arm-smmu-v3: Explain why ATS stays disabled with bypass

PATCH Applied Jean-Philippe Brucker 2 participants 2 messages Mar 21, 2023 – Mar 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/arm-smmu-v3: Explain why ATS stays disabled with bypass

The SMMU does not support enabling ATS for a bypass stream. Add a comment.

---
As promised here:
https://lore.kernel.org/linux-iommu/Y9z3UG+wEBn4i3G2@myrica/

---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +7 -0
index f2425b0f0cd6..a8410c132f1e 100644
@@ -2447,6 +2447,13 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
 
 	master->domain = smmu_domain;
 
+	/*
+	 * The SMMU does not support enabling ATS with bypass. When the STE is
+	 * in bypass (STE.Config[2:0] == 0b100), ATS Translation Requests and
+	 * Translated transactions are denied as though ATS is disabled for the
+	 * stream (STE.EATS == 0b00), causing F_BAD_ATS_TREQ and
+	 * F_TRANSL_FORBIDDEN events (IHI0070Ea 5.2 Stream Table Entry).
+	 */
 	if (smmu_domain->stage != ARM_SMMU_DOMAIN_BYPASS)
 		master->ats_enabled = arm_smmu_ats_supported(master);
 
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Jean-Philippe Brucker

The SMMU does not support enabling ATS for a bypass stream. Add a comment.

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-v3: Explain why ATS stays disabled with bypass

      https://git.kernel.org/will/c/8c153645fa40

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev