Commit f9785950 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Alex Williamson
Browse files

vfio: Require drivers to implement get_region_info



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

Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarPranjal Shrivastava <praan@google.com>
Reviewed-by: default avatarMostafa Saleh <smostafa@google.com>
Signed-off-by: default avatarJason 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: default avatarAlex Williamson <alex@shazbot.org>
parent e664067b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
		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