From a46c2139b02581c6d2462bc131930847efea8335 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 30 May 2019 04:37:27 +0100 Subject: [PATCH 6/8] vfio: Make vfio_get_region_info_cap public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: David Gibson Message-id: <20190530043728.32575-6-dgibson@redhat.com> Patchwork-id: 88420 O-Subject: [RHEL-8.1 qemu-kvm PATCH 5/6] vfio: Make vfio_get_region_info_cap public Bugzilla: 1710662 RH-Acked-by: Philippe Mathieu-Daudé RH-Acked-by: Laurent Vivier RH-Acked-by: Auger Eric RH-Acked-by: Cornelia Huck From: Alexey Kardashevskiy This makes vfio_get_region_info_cap() to be used in quirks. Signed-off-by: Alexey Kardashevskiy Acked-by: Alex Williamson Message-Id: <20190307050518.64968-3-aik@ozlabs.ru> Signed-off-by: David Gibson (cherry picked from commit 013002f0fbf62545c0f5ea4c5c2d554a85919647) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1710662 Signed-off-by: David Gibson Signed-off-by: Danilo C. L. de Paula --- hw/vfio/common.c | 2 +- include/hw/vfio/vfio-common.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 3ab92bd..3dbccfc 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -706,7 +706,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; diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 36ee657..7607be3 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -197,6 +197,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; -- 1.8.3.1