vfio: Create device specific region info helper
commite61a424f0573634a1bc180de965b2cb794c1038e
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 26 May 2016 15:43:20 +0000 (26 09:43 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 26 May 2016 17:04:50 +0000 (26 11:04 -0600)
tree28ae3c7a3d9934a6a022c8c87a74800865cbfbbf
parentb53b0f696b10828f6393155f44a352c019e673fd
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>
hw/vfio/common.c
include/hw/vfio/vfio-common.h
trace-events