From patchwork Wed Feb 27 08:51:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 10831419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44B5F1390 for ; Wed, 27 Feb 2019 08:55:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 309AB2AF92 for ; Wed, 27 Feb 2019 08:55:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 247902BB07; Wed, 27 Feb 2019 08:55:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB1872AF92 for ; Wed, 27 Feb 2019 08:55:34 +0000 (UTC) Received: from localhost ([127.0.0.1]:40423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyv02-0006v8-4i for patchwork-qemu-devel@patchwork.kernel.org; Wed, 27 Feb 2019 03:55:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyuwj-000482-TO for qemu-devel@nongnu.org; Wed, 27 Feb 2019 03:52:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyuwj-0004FE-4l for qemu-devel@nongnu.org; Wed, 27 Feb 2019 03:52:09 -0500 Received: from ozlabs.ru ([107.173.13.209]:35318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyuwi-0004F5-Uw; Wed, 27 Feb 2019 03:52:09 -0500 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 0B02CAE800EC; Wed, 27 Feb 2019 03:52:05 -0500 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Wed, 27 Feb 2019 19:51:48 +1100 Message-Id: <20190227085149.38596-6-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190227085149.38596-1-aik@ozlabs.ru> References: <20190227085149.38596-1-aik@ozlabs.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 107.173.13.209 Subject: [Qemu-devel] [PATCH qemu v3 5/6] vfio: Make vfio_get_region_info_cap public X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Ricardo Ziviani , Alexey Kardashevskiy , Daniel Henrique Barboza , Alex Williamson , Sam Bobroff , Piotr Jaroszynski , qemu-ppc@nongnu.org, =?utf-8?q?Leonardo_Augusto_Guimar=C3=A3es_Garcia?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 7624c9f..fbf0966 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 df2b472..4374cc6 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -729,7 +729,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;