Re: [PATCH rc v5 1/4] iommu/arm-smmu-v3: Add update_safe bits to fix STE update sequence
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2026-01-15 13:11:57
Also in:
linux-iommu, lkml
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2026-01-15 13:11:57
Also in:
linux-iommu, lkml
On Tue, Jan 13, 2026 at 04:51:12PM -0400, Jason Gunthorpe wrote:
quoted
- safe_bits[1] |= cpu_to_le64(STRTAB_STE_1_EATS); + if (!((cur[2] | target[2]) & cpu_to_le64(STRTAB_STE_2_S2S))) + safe_bits[1] |= cpu_to_le64( + FIELD_PREP(STRTAB_STE_1_EATS, STRTAB_STE_1_EATS_TRANS)); -------------------------------------------------------------------------- @will, does this look good to you? I can send a v7 with this.That is an easy way to address Will's observation, makes sense to me.
Ah, but it looks like it can generate an errant view of a EATS that is
neither old or new. Ie value 3, reserved.
I think you should just check if old or new has EATS bit 1 set:
if (!((cur[2] | target[2]) & cpu_to_le64(STRTAB_STE_2_S2S)) &&
!((cur[1] | target[1]) & cpu_to_le64(FIELD_PREP(STRTAB_STE_1_EATS, 2))))
Which the current driver never does..
Jason