> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Tuesday, April 29, 2025 10:34 PM > > 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. > for entire series: Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>