Re: [PATCH] iommu/io-pgtable-arm: Add support for contiguous hint bit

From: Robin Murphy

Date: Wed Jul 15 2026 - 13:45:26 EST


On 15/07/2026 1:50 pm, Jason Gunthorpe wrote:
On Wed, Jul 15, 2026 at 01:14:18PM +0100, Robin Murphy wrote:

Conversely though, I really wouldn't want to have to maintain arm-smmu
supporting two completely different pagetable APIs simultaneously either :/

Does arm-smmu era HW even support CONT?

Yes, it goes all the way back to ARMv7 LPAE, predating even SMMUv1, and certainly at least Arm's implementations (MMU-400/401/500) can all make meaningful use of it.

AFAICR the biggest issue with arm-smmu was it using IO_PGTABLE_ARMV7S
as well. I think it would be fine to implement all the unique LPAE
features it needs in iommupt, I did most of them already.

I do have an ARMV7S implementation for iommupt, but I did not solve
the sub page problem. So while it is functionally working it is not
usable since it wastes so much memory. That's a tricky problem to
solve since the algorithms depend on the gather->freelist.

I didn't spend any time trying to do anything about this as I was not
intending to touch arm-smmu

Indeed between the irregular table sizes (before you even get to the Mediatek shenanigans...), and the awkward GFP_DMA limitations and/or reality that many of the systems using it really don't have memory to waste, I'd have considered v7s pretty much terminally incompatible with iommu_pages and the abstraction that iommupt is trying to be... :/

Thanks,
Robin.