diff options
author | Alex Williamson | 2016-05-26 17:43:20 +0200 |
---|---|---|
committer | Alex Williamson | 2016-05-26 19:04:50 +0200 |
commit | e61a424f0573634a1bc180de965b2cb794c1038e (patch) | |
tree | 28ae3c7a3d9934a6a022c8c87a74800865cbfbbf /include | |
parent | vfio: Enable sparse mmap capability (diff) | |
download | qemu-e61a424f0573634a1bc180de965b2cb794c1038e.tar.gz qemu-e61a424f0573634a1bc180de965b2cb794c1038e.tar.xz qemu-e61a424f0573634a1bc180de965b2cb794c1038e.zip |
vfio: Create device specific region info helper
Given a device specific region type and sub-type, find it. Also
cleanup return point on error in vfio_get_region_info() so that we
always return 0 with a valid pointer or -errno and NULL.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/vfio/vfio-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index eb0e1b0342..a947f9ccda 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -154,5 +154,7 @@ 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); +int vfio_get_dev_region_info(VFIODevice *vbasedev, uint32_t type, + uint32_t subtype, struct vfio_region_info **info); #endif #endif /* !HW_VFIO_VFIO_COMMON_H */ |