diff options
author | Alex Williamson | 2016-03-10 17:39:07 +0100 |
---|---|---|
committer | Alex Williamson | 2016-03-10 17:39:07 +0100 |
commit | 469002263a295ec471c1498c3b456ccd9f85a841 (patch) | |
tree | 71ee90f35f8dc2d6887047e5cb07e4009301e01e /include/hw/vfio | |
parent | vfio: Add sysfsdev property for pci & platform (diff) | |
download | qemu-469002263a295ec471c1498c3b456ccd9f85a841.tar.gz qemu-469002263a295ec471c1498c3b456ccd9f85a841.tar.xz qemu-469002263a295ec471c1498c3b456ccd9f85a841.zip |
vfio: Wrap VFIO_DEVICE_GET_REGION_INFO
In preparation for supporting capability chains on regions, wrap
ioctl(VFIO_DEVICE_GET_REGION_INFO) so we don't duplicate the code for
each caller.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/hw/vfio')
-rw-r--r-- | include/hw/vfio/vfio-common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 7e00ffca15..a147bd203e 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -25,6 +25,9 @@ #include "exec/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" +#ifdef CONFIG_LINUX +#include <linux/vfio.h> +#endif /*#define DEBUG_VFIO*/ #ifdef DEBUG_VFIO @@ -139,4 +142,8 @@ extern const MemoryRegionOps vfio_region_ops; extern QLIST_HEAD(vfio_group_head, VFIOGroup) vfio_group_list; extern QLIST_HEAD(vfio_as_head, VFIOAddressSpace) vfio_address_spaces; +#ifdef CONFIG_LINUX +int vfio_get_region_info(VFIODevice *vbasedev, int index, + struct vfio_region_info **info); +#endif #endif /* !HW_VFIO_VFIO_COMMON_H */ |