> From: liulongfang <[email protected]> > Sent: Tuesday, October 28, 2025 9:56 AM > > On 2025/10/24 7:09, Jason Gunthorpe wrote: > > + if (info.argsz < minsz) > > + return -EINVAL; > > > > - if (info.index == VFIO_PCI_BAR2_REGION_INDEX) { > > - info.offset = VFIO_PCI_INDEX_TO_OFFSET(info.index); > > + if (info.index != VFIO_PCI_BAR2_REGION_INDEX) > > + return vfio_pci_ioctl_get_region_info(core_vdev, arg); > > Looking at your first patch from my driver implementation code, the > vfio_pci_ioctl_get_region_info > function doesn't need to modify the first parameter; it can directly use vdev. >
it is used by some drivers directly as callback in struct vfio_device_ops, so the 1st parameter needs to be struct vfio_device.
