Re: [PATCH 5/6] iommu: Add Broadcom BCM2712 IOMMU driver
From: Jason Gunthorpe
Date: Sat Jul 18 2026 - 10:32:55 EST
On Sat, Jul 18, 2026 at 09:39:48AM +0100, Daniel Drake wrote:
> I don't think I can use that because this setup uses an IOVA aperture at
> base 0xA00000000, whereas generic_pt assumes it is managing a 0-indexed
> virtual address space. So the driver has to intercept every incoming IOVA
> and translate for the aperture, see how map_pages calls:
When you say aperture here you mean we place an IOPTE at VA 0 but the
dma_addr_t for that has to be adjusted to 0xA00000000 ?
I wonder if DT can do this with dma-ranges or something, we have many
other conditions where the dma_addr_t and the internal physical have
offsets..
> I was wondering about making iommupt understand apertures and
> translate accordingly, but I imagine you would want to keep that
> kind of thing out of the generic fast path?
We already have pt_full_va_prefix() which isn't strictly an offset but
it it probably matches what this HW does.
You can implement it in the broadcom format and return the prefix value.
So long as the vasz fits within those trailing 0s. That's basically
free and has no runtime cost on other formats.
Jason