On Mon, Jun 09, 2025 at 05:41:24PM -0300, Jason Gunthorpe wrote: > Now that all drivers are using domain_alloc_paging() and dev is never > NULL, we can have all drivers correctly set domain.pgsize_bitmap during > their allocation function. > > There are a few oddities that have accumulated here over past changes: > > - Some drivers always set domain.pgsize_bitmap during their > domain_alloc_paging() call but still provide a value in ops. This is dead > code, delete it. > > - Some drivers calculate a system global pgsize_bitmap in the ops, but > it is now trivial to use the per-instance value instead. In several > cases this is dead code, delete it. This also allows > constifying the ops in these drivers as a hardening measure > > - Some drivers have a fixed pgsize_bitmap, put it next to setting up the > geometry in their domain_alloc_paging() functions. > > - Finally a few drivers still use ops because they have a delayed > finalize operation. Set the constant pgsize_bitmap in the > domain_alloc_paging(). > > Then remove ops.pgsize_bitmap. > > This is based on iommu next, and must go after the virtio > domain_alloc_paging() conversion. > > v2: > - Rebase on v6.16-rc1 Sanity tests with SMMUv3 look good. Tested-by: Nicolin Chen <nicolinc@xxxxxxxxxx>