Re: [PATCH RFCv1 3/3] iommu/arm-smmu-v3: Allow ATS to be always on

Jason Gunthorpe
2026-01-26T17:20:28Z

On Mon, Jan 26, 2026 at 12:39:50PM +0000, Will Deacon wrote:
> > + ret = arm_smmu_alloc_cd_tables(master);
> > + if (ret)
> > + return ret;
>
> Were do you allocate the second level entry for ssid 0 if we're using
> 2-level cd tables?

I don't think we need to. The entire design here has a non-valid CD entry
for SSID 0.

The spec is really weird here, on one hand it explicitly says that with
S1DSS the CD entry is ignored.

On the other hand, you are also required to have a CD table pointer of
at least size one for some reason.

So, I think a CD table pointer to a fully invalid L1 table of at least
size 1 should be OK?

Or stated another way, why would ie be OK to have a 1 level table with
an non-valid CD table entry for SSID0 but not OK to have a 2 level
table that returns non-valid at the first walk?

Jason