vfio: Require drivers to implement get_region_info

Remove the fallback through the ioctl callback, no drivers use this now.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/14-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:30 -04:00
committed by Alex Williamson
parent e664067b60
commit f978595038

View File

@@ -1297,13 +1297,13 @@ static long vfio_device_fops_unl_ioctl(struct file *filep,
break;
case VFIO_DEVICE_GET_REGION_INFO:
if (!device->ops->get_region_info)
goto ioctl_fallback;
ret = device->ops->get_region_info(device, uptr);
if (unlikely(!device->ops->get_region_info))
ret = -EINVAL;
else
ret = device->ops->get_region_info(device, uptr);
break;
default:
ioctl_fallback:
if (unlikely(!device->ops->ioctl))
ret = -EINVAL;
else