b38b0f
From a46c2139b02581c6d2462bc131930847efea8335 Mon Sep 17 00:00:00 2001
b38b0f
From: David Gibson <dgibson@redhat.com>
b38b0f
Date: Thu, 30 May 2019 04:37:27 +0100
b38b0f
Subject: [PATCH 6/8] vfio: Make vfio_get_region_info_cap public
b38b0f
MIME-Version: 1.0
b38b0f
Content-Type: text/plain; charset=UTF-8
b38b0f
Content-Transfer-Encoding: 8bit
b38b0f
b38b0f
RH-Author: David Gibson <dgibson@redhat.com>
b38b0f
Message-id: <20190530043728.32575-6-dgibson@redhat.com>
b38b0f
Patchwork-id: 88420
b38b0f
O-Subject: [RHEL-8.1 qemu-kvm PATCH 5/6] vfio: Make vfio_get_region_info_cap public
b38b0f
Bugzilla: 1710662
b38b0f
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
b38b0f
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
b38b0f
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
b38b0f
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
b38b0f
b38b0f
From: Alexey Kardashevskiy <aik@ozlabs.ru>
b38b0f
b38b0f
This makes vfio_get_region_info_cap() to be used in quirks.
b38b0f
b38b0f
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
b38b0f
Acked-by: Alex Williamson <alex.williamson@redhat.com>
b38b0f
Message-Id: <20190307050518.64968-3-aik@ozlabs.ru>
b38b0f
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
b38b0f
(cherry picked from commit 013002f0fbf62545c0f5ea4c5c2d554a85919647)
b38b0f
b38b0f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1710662
b38b0f
b38b0f
Signed-off-by: David Gibson <dgibson@redhat.com>
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 hw/vfio/common.c              | 2 +-
b38b0f
 include/hw/vfio/vfio-common.h | 2 ++
b38b0f
 2 files changed, 3 insertions(+), 1 deletion(-)
b38b0f
b38b0f
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
b38b0f
index 3ab92bd..3dbccfc 100644
b38b0f
--- a/hw/vfio/common.c
b38b0f
+++ b/hw/vfio/common.c
b38b0f
@@ -706,7 +706,7 @@ static void vfio_listener_release(VFIOContainer *container)
b38b0f
     }
b38b0f
 }
b38b0f
 
b38b0f
-static struct vfio_info_cap_header *
b38b0f
+struct vfio_info_cap_header *
b38b0f
 vfio_get_region_info_cap(struct vfio_region_info *info, uint16_t id)
b38b0f
 {
b38b0f
     struct vfio_info_cap_header *hdr;
b38b0f
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
b38b0f
index 36ee657..7607be3 100644
b38b0f
--- a/include/hw/vfio/vfio-common.h
b38b0f
+++ b/include/hw/vfio/vfio-common.h
b38b0f
@@ -197,6 +197,8 @@ int vfio_get_region_info(VFIODevice *vbasedev, int index,
b38b0f
 int vfio_get_dev_region_info(VFIODevice *vbasedev, uint32_t type,
b38b0f
                              uint32_t subtype, struct vfio_region_info **info);
b38b0f
 bool vfio_has_region_cap(VFIODevice *vbasedev, int region, uint16_t cap_type);
b38b0f
+struct vfio_info_cap_header *
b38b0f
+vfio_get_region_info_cap(struct vfio_region_info *info, uint16_t id);
b38b0f
 #endif
b38b0f
 extern const MemoryListener vfio_prereg_listener;
b38b0f
 
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f