Re: [PATCH v4 06/10] vfio: selftests: Allow drivers to specify required region size

Jason Gunthorpe <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,dev.linux.lists.patches,org.kernel.vger.kvm,org.kernel.vger.linux-rdma,org.kernel.vger.netdev
Message-ID <[email protected]>
On Wed, Aug 12, 2026 at 10:11:30PM +0000, David Matlack wrote:
> > @@ -32,6 +32,9 @@ void vfio_pci_driver_probe(struct vfio_pci_device *device)
> >  			continue;
> >  
> >  		device->driver.ops = ops;
> > +
> > +		VFIO_ASSERT_NE(ops->region_size, 0);
> > +		device->driver.region.size = ops->region_size;
> 
> I'm seeing failures with the IGB driver with this series. I think it's
> coming from here. The region size needs to be page-aligned so that the
> IOMMU map/unmap calls can work?
> 
> The size of struct igb is 0x20080 bytes which is not page-aligned. The
> size of struct mlx5st_device is 0x200D000, which is page-aligned, so
> that's probably why your Claude did not notice.

Makes sense, I didn't use claude for this, but it explains why my
tests passed. I've adjusted it as you showed

Jason
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.