vfio/pci: Fill in the missing get_region_info ops

Now that every variant driver provides a get_region_info op remove the
ioctl based dispatch from vfio_pci_core_ioctl().

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v2-2a9e24d62f1b+e10a-vfio_get_region_info_op_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
This commit is contained in:
Jason Gunthorpe 2025-11-07 13:41:21 -04:00 committed by Alex Williamson
parent 5ac7206474
commit f3fddb71dd
8 changed files with 8 additions and 2 deletions

View File

@ -1631,6 +1631,7 @@ static const struct vfio_device_ops hisi_acc_vfio_pci_ops = {
.open_device = hisi_acc_vfio_pci_open_device, .open_device = hisi_acc_vfio_pci_open_device,
.close_device = vfio_pci_core_close_device, .close_device = vfio_pci_core_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,

View File

@ -1366,6 +1366,7 @@ static const struct vfio_device_ops mlx5vf_pci_ops = {
.open_device = mlx5vf_pci_open_device, .open_device = mlx5vf_pci_open_device,
.close_device = mlx5vf_pci_close_device, .close_device = mlx5vf_pci_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,

View File

@ -707,6 +707,7 @@ static const struct vfio_device_ops nvgrace_gpu_pci_core_ops = {
.open_device = nvgrace_gpu_open_device, .open_device = nvgrace_gpu_open_device,
.close_device = vfio_pci_core_close_device, .close_device = vfio_pci_core_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,

View File

@ -195,6 +195,7 @@ static const struct vfio_device_ops pds_vfio_ops = {
.open_device = pds_vfio_open_device, .open_device = pds_vfio_open_device,
.close_device = pds_vfio_close_device, .close_device = pds_vfio_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,

View File

@ -609,6 +609,7 @@ static const struct vfio_device_ops qat_vf_pci_ops = {
.open_device = qat_vf_pci_open_device, .open_device = qat_vf_pci_open_device,
.close_device = qat_vf_pci_close_device, .close_device = qat_vf_pci_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,
.mmap = vfio_pci_core_mmap, .mmap = vfio_pci_core_mmap,

View File

@ -132,6 +132,7 @@ static const struct vfio_device_ops vfio_pci_ops = {
.open_device = vfio_pci_open_device, .open_device = vfio_pci_open_device,
.close_device = vfio_pci_core_close_device, .close_device = vfio_pci_core_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,

View File

@ -1460,8 +1460,6 @@ long vfio_pci_core_ioctl(struct vfio_device *core_vdev, unsigned int cmd,
return vfio_pci_ioctl_get_irq_info(vdev, uarg); return vfio_pci_ioctl_get_irq_info(vdev, uarg);
case VFIO_DEVICE_GET_PCI_HOT_RESET_INFO: case VFIO_DEVICE_GET_PCI_HOT_RESET_INFO:
return vfio_pci_ioctl_get_pci_hot_reset_info(vdev, uarg); return vfio_pci_ioctl_get_pci_hot_reset_info(vdev, uarg);
case VFIO_DEVICE_GET_REGION_INFO:
return vfio_pci_ioctl_get_region_info(core_vdev, uarg);
case VFIO_DEVICE_IOEVENTFD: case VFIO_DEVICE_IOEVENTFD:
return vfio_pci_ioctl_ioeventfd(vdev, uarg); return vfio_pci_ioctl_ioeventfd(vdev, uarg);
case VFIO_DEVICE_PCI_HOT_RESET: case VFIO_DEVICE_PCI_HOT_RESET:

View File

@ -88,6 +88,7 @@ static const struct vfio_device_ops virtiovf_vfio_pci_lm_ops = {
.open_device = virtiovf_pci_open_device, .open_device = virtiovf_pci_open_device,
.close_device = virtiovf_pci_close_device, .close_device = virtiovf_pci_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,
@ -131,6 +132,7 @@ static const struct vfio_device_ops virtiovf_vfio_pci_ops = {
.open_device = virtiovf_pci_open_device, .open_device = virtiovf_pci_open_device,
.close_device = vfio_pci_core_close_device, .close_device = vfio_pci_core_close_device,
.ioctl = vfio_pci_core_ioctl, .ioctl = vfio_pci_core_ioctl,
.get_region_info = vfio_pci_ioctl_get_region_info,
.device_feature = vfio_pci_core_ioctl_feature, .device_feature = vfio_pci_core_ioctl_feature,
.read = vfio_pci_core_read, .read = vfio_pci_core_read,
.write = vfio_pci_core_write, .write = vfio_pci_core_write,