Subject: Re: [PATCH v4 18/24] iommu/arm-smmu-v3: Introduce master->ats_broken flag

From: Jason Gunthorpe <[email-masked]>
Date: Mon, 1 Jun 2026 21:15:47 -0300

On Mon, Jun 01, 2026 at 01:41:26PM -0700, Nicolin Chen wrote:
> On Mon, Jun 01, 2026 at 09:32:31AM -0300, Jason Gunthorpe wrote:
> > On Fri, May 29, 2026 at 06:27:40PM -0700, Nicolin Chen wrote:
> > > On Tue, May 19, 2026 at 09:06:58AM -0300, Jason Gunthorpe wrote:
> > > > On Mon, May 18, 2026 at 08:39:01PM -0700, Nicolin Chen wrote:
> > > So I've tried INV_TYPE_ATS_BROKEN: during per-domain invalidation,
> > > each batch is built from domain->invs so it can carry the "invs";
> > > if the batch times out, we can immediately mutate its ATS entries.
> > > 
> > > But I realized a limitation. E.g., if a device attaches to two SVA
> > > domains on two SSIDs. An invalidation timing out on one of the SVA
> > > domains could mark INV_TYPE_ATS_BROKEN in its own invs, but not in
> > > the other SVA domain's invs?
> > 
> > You'd have to mark all the S1's sharing the STE.
> 
> That would be a bit convoluted as we would have to go through all
> other domains' invs arrays.

Ok, that is certainly an annoying problem.

I don't have a better idea than storing the master unfortunately

But I think the locking for that is going to be tricky, I'm not sure it does
actually fully work..

Jason