From nobody Tue Feb 10 05:45:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552385426151518.3622537982702; Tue, 12 Mar 2019 03:10:26 -0700 (PDT) Received: from localhost ([127.0.0.1]:48803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3eMP-00088K-V9 for importer@patchew.org; Tue, 12 Mar 2019 06:10:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3dUQ-0000mG-61 for qemu-devel@nongnu.org; Tue, 12 Mar 2019 05:14:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3dDz-00031R-TU for qemu-devel@nongnu.org; Tue, 12 Mar 2019 04:57:28 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:53787) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3dDz-0002kL-G0; Tue, 12 Mar 2019 04:57:27 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 44JTMn48K9z9sQn; Tue, 12 Mar 2019 19:55:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1552380949; bh=/SOWnS87DFN9hUb7mNrOboWCjoPrGzm6ipI2XT60QgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NvxcxIDB0GXLOF/XtyRcQBKpLSs5GiUO+pBcH3pbH/+9ddWqG/fQ9aco1Z4QOtfwS gsCm/3G3dRMw16sRpxxDN5A9lRLZ41EGwTGPQ17uTOoLm6k0tvFxMTcrk3zjRbjiZe UDYYWIJLNIb6OdK2xwhEGGuh8hIubWYCDl0XS2Yg= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 12 Mar 2019 19:55:02 +1100 Message-Id: <20190312085502.8203-63-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312085502.8203-1-david@gibson.dropbear.id.au> References: <20190312085502.8203-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 62/62] 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: lvivier@redhat.com, Alexey Kardashevskiy , qemu-devel@nongnu.org, groug@kaod.org, Alex Williamson , qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- 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 df2b4721bf..4374cc6176 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -729,7 +729,7 @@ static void vfio_listener_release(VFIOContainer *contai= ner) } } =20 -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 7624c9f511..fbf0966af4 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 inde= x, int vfio_get_dev_region_info(VFIODevice *vbasedev, uint32_t type, uint32_t subtype, struct vfio_region_info **i= nfo); bool vfio_has_region_cap(VFIODevice *vbasedev, int region, uint16_t cap_ty= pe); +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; =20 --=20 2.20.1