diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2016-05-26 09:43:20 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-05-26 11:04:50 -0600 |
commit | e61a424f0573634a1bc180de965b2cb794c1038e (patch) | |
tree | 28ae3c7a3d9934a6a022c8c87a74800865cbfbbf /include/hw/vfio | |
parent | b53b0f696b10828f6393155f44a352c019e673fd (diff) |
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/hw/vfio')
-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 */ |