]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/arm-smmu-v3: Mark EATS_TRANS safe when computing the update sequence
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 15 Jan 2026 18:23:30 +0000 (10:23 -0800)
committerWill Deacon <will@kernel.org>
Fri, 23 Jan 2026 13:47:49 +0000 (13:47 +0000)
commit7cad800485956a263318930613f8f4a084af8c70
treea816b620d6d3a10d36c12576a6986bb57e9f0deb
parentf3c1d372dbb8e5a86923f20db66deabef42bfc9d
iommu/arm-smmu-v3: Mark EATS_TRANS safe when computing the update sequence

If VM wants to toggle EATS_TRANS off at the same time as changing the CFG,
hypervisor will see EATS change to 0 and insert a V=0 breaking update into
the STE even though the VM did not ask for that.

In bare metal, EATS_TRANS is ignored by CFG=ABORT/BYPASS, which is why this
does not cause a problem until we have the nested case where CFG is always
a variation of S2 trans that does use EATS_TRANS.

Relax the rules for EATS_TRANS sequencing, we don't need it to be exact as
the enclosing code will always disable ATS at the PCI device when changing
EATS_TRANS. This ensures there are no ATS transactions that can race with
an EATS_TRANS change so we don't need to carefully sequence these bits.

Fixes: 1e8be08d1c91 ("iommu/arm-smmu-v3: Support IOMMU_DOMAIN_NESTED")
Cc: stable@vger.kernel.org
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c