yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-vfio-Make-vfio_get_region_info_cap-public.patch

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