On Mon, May 04, 2026 at 08:55:58PM +0000, David Matlack wrote:
> On 2026-04-30 09:08 PM, Jason Gunthorpe wrote:
> > Add a region_size field to struct vfio_pci_driver_ops so drivers can
> > declare how much DMA-mapped region they need. The mlx5 driver will
> > need ~18MB for firmware pages. Existing drivers leave region_size as
> > 0 and get the current default of SZ_2M.
> 
> I would like to get rid of the magic SZ_2M to make it easier for other
> tests to use the driver framework. Can you make this commit update all
> the drivers to set region_size? They can all use the same approach:
> 
>   struct vfio_pci_driver_ops foo_driver = {
>           ...
>           .region_size = roundup_pow_of_two(sizeof(struct foo)),
>           ...
>   };

Sure, lets put the roundup in the core code?

Jason

Reply via email to