Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jason Gunthorpe and committed by
Alex Williamson
f9785950 e664067b

+4 -4
+4 -4
drivers/vfio/vfio_main.c
··· 1297 1297 break; 1298 1298 1299 1299 case VFIO_DEVICE_GET_REGION_INFO: 1300 - if (!device->ops->get_region_info) 1301 - goto ioctl_fallback; 1302 - ret = device->ops->get_region_info(device, uptr); 1300 + if (unlikely(!device->ops->get_region_info)) 1301 + ret = -EINVAL; 1302 + else 1303 + ret = device->ops->get_region_info(device, uptr); 1303 1304 break; 1304 1305 1305 1306 default: 1306 - ioctl_fallback: 1307 1307 if (unlikely(!device->ops->ioctl)) 1308 1308 ret = -EINVAL; 1309 1309 else