From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMUGy-000332-0m for qemu-devel@nongnu.org; Tue, 13 Nov 2018 03:42:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMU6a-0005gQ-3X for qemu-devel@nongnu.org; Tue, 13 Nov 2018 03:31:36 -0500 From: Alexey Kardashevskiy Date: Tue, 13 Nov 2018 19:31:03 +1100 Message-Id: <20181113083104.2692-7-aik@ozlabs.ru> In-Reply-To: <20181113083104.2692-1-aik@ozlabs.ru> References: <20181113083104.2692-1-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH qemu RFC 6/7] vfio: Make vfio_get_region_info_cap public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, David Gibson , Alistair Popple , Reza Arbab , Sam Bobroff , Piotr Jaroszynski , =?UTF-8?q?Leonardo=20Augusto=20Guimar=C3=A3es=20Garcia?= , Jose Ricardo Ziviani , Alex Williamson , Oliver O'Halloran This makes vfio_get_region_info_cap() to be used in quirks. Signed-off-by: Alexey Kardashevskiy --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/common.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 1b434d0..abc82f9 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -189,6 +189,8 @@ int vfio_get_region_info(VFIODevice *vbasedev, int index, int vfio_get_dev_region_info(VFIODevice *vbasedev, uint32_t type, uint32_t subtype, struct vfio_region_info **info); bool vfio_has_region_cap(VFIODevice *vbasedev, int region, uint16_t cap_type); +struct vfio_info_cap_header * +vfio_get_region_info_cap(struct vfio_region_info *info, uint16_t id); #endif extern const MemoryListener vfio_prereg_listener; diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 7c185e5a..f58b487 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -711,7 +711,7 @@ static void vfio_listener_release(VFIOContainer *container) } } -static struct vfio_info_cap_header * +struct vfio_info_cap_header * vfio_get_region_info_cap(struct vfio_region_info *info, uint16_t id) { struct vfio_info_cap_header *hdr; -- 2.17.1