summaryrefslogtreecommitdiff
path: root/include/linux/vfio.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2025-11-07 13:41:17 -0400
committerAlex Williamson <alex@shazbot.org>2025-11-12 14:58:23 -0700
commit113557b0406818a8a5df3479b0a89125d2b2a04c (patch)
tree975e048af935089042fa23b91c706d6e53f9500b /include/linux/vfio.h
parent0ed3a30fd996cb0cac872432cf25185fda7e5316 (diff)
downloadlwn-113557b0406818a8a5df3479b0a89125d2b2a04c.tar.gz
lwn-113557b0406818a8a5df3479b0a89125d2b2a04c.zip
vfio: Provide a get_region_info op
Instead of hooking the general ioctl op, have the core code directly decode VFIO_DEVICE_GET_REGION_INFO and call an op just for it. This is intended to allow mechanical changes to the drivers to pull their VFIO_DEVICE_GET_REGION_INFO int oa function. Later patches will improve the function signature to consolidate more code. 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/1-v2-2a9e24d62f1b+e10a-vfio_get_region_info_op_jgg@nvidia.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'include/linux/vfio.h')
-rw-r--r--include/linux/vfio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index eb563f538dee..be5fcf8432e8 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -132,6 +132,8 @@ struct vfio_device_ops {
size_t count, loff_t *size);
long (*ioctl)(struct vfio_device *vdev, unsigned int cmd,
unsigned long arg);
+ int (*get_region_info)(struct vfio_device *vdev,
+ struct vfio_region_info __user *arg);
int (*mmap)(struct vfio_device *vdev, struct vm_area_struct *vma);
void (*request)(struct vfio_device *vdev, unsigned int count);
int (*match)(struct vfio_device *vdev, char *buf);