On Fri, Jul 29, 2022 at 04:24:36AM +0000, Tian, Kevin wrote: > > It is a POWER specific thing with one not-so-obvious consequence of each > > window having an independent page size (fixed at the moment or creation) > > and (most likely) different page size, like, 4K vs. 2M. > > page size is anyway decided by the iommu driver. Same for other vendors. > the caller (e.g. vfio) just tries to map as many contiguous pages as > possible but in the end it's iommu driver to decide the actual size. An iommu_domain with a non-uniform page_size is weird, but it could be made to work as some device-specific thing. The only thing the core codes care about is the minimum alignment, so you'd just have to set it to 4k and mapping the wrong thing to the 2M area would fail. domains with their io page size != PAGE_SIZE are already very special things that require special handling by userspace.. Jason