From nobody Sun Feb 8 21:09:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1770104029; cv=none; d=zohomail.com; s=zohoarc; b=XmYfjegF1gEs7qvc3ahjC4O32AcSohI1YvgDyl+wBhtOOgcnRWO/IkL9BBEmHQLgAYCxzyG0y/Dj0DRMZrxAcoE6mC9tUNPJt6I9MOKj5GumCwunRG1rWmzANF/PgJkmNh6qwV4OMjfIUL+rhULFwiHYsIA7uVLi6FTfFkHwV8A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770104029; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Sf79CiAG6SfHqkNGj75oFk3mJTt1TqAQVqnu+Y8ZqiE=; b=fveH1SWs+fHs7799XA4zLQCk4N3QbXj79ASDqfCCCU1+skLOHHz9X13qUuj0oCj3v2T1O3ztbLA+VOV7CTCsbPEJ3J1GcQHxFA1dvO+TanJXikgOIH7xyWC2Zjga3MKPncLFhwE931jVlInN3zrXZwg8iKad4UERaM7gptnsPPw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770104029309525.1013521593125; Mon, 2 Feb 2026 23:33:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vnAu4-0007N0-VQ; Tue, 03 Feb 2026 02:32:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vnAu0-0007Eo-OM for qemu-devel@nongnu.org; Tue, 03 Feb 2026 02:32:49 -0500 Received: from mgamail.intel.com ([192.198.163.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vnAtx-00067a-2C for qemu-devel@nongnu.org; Tue, 03 Feb 2026 02:32:47 -0500 Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2026 23:32:36 -0800 Received: from vkasired-desk2.fm.intel.com ([10.105.128.132]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2026 23:32:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770103965; x=1801639965; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vLJ04mRE3eaGEiRhVGrnFwJ/UmQVbHxQHcqyM8xjArE=; b=Bg4bvUpuCOhoe1Iw085t2BPT35QzYaAeQGDBgYDd9lSaT10z60RotGE1 NnoSR+3o82K+/X2WhcPy93lfkSoVGWNSRpWjZbuZ+A8qSoutZBseKpCVe S/2UixW42VpV2XCWSffX7+f55GXbQexxa019w77aG5cShh20ukKy1D9NI HSdHgEPCt0KXsjHmLXxWvMCA2EcBOsozxWq3WA226hUMrbxidITK3kffk KYPrAE5bsBniYbiGmUnuDIn+5X7xdQTY0rddMZwqO0vxDkwkXt5qddHdL 45yXg0kQDqYxRMipsUwLOM8gzZ9baKM+/YONk0kmKx/w2zpPIbKfDHs5s A==; X-CSE-ConnectionGUID: 94DCVQo+Q063JSBoD/N/8A== X-CSE-MsgGUID: 2yBdS4rATKasqif0V6b1qA== X-IronPort-AV: E=McAfee;i="6800,10657,11690"; a="82640910" X-IronPort-AV: E=Sophos;i="6.21,270,1763452800"; d="scan'208";a="82640910" X-CSE-ConnectionGUID: Dp2X0oMYS9qOiE4wKVfl4g== X-CSE-MsgGUID: Qxozh33DRWaJa4g+WNK8qA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,270,1763452800"; d="scan'208";a="247373105" From: Vivek Kasireddy To: qemu-devel@nongnu.org Cc: Vivek Kasireddy , Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v5 07/12] vfio: Document vfio_device_get_region_info() Date: Mon, 2 Feb 2026 23:30:14 -0800 Message-ID: <20260203073200.848183-8-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260203073200.848183-1-vivek.kasireddy@intel.com> References: <20260203073200.848183-1-vivek.kasireddy@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=192.198.163.10; envelope-from=vivek.kasireddy@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1770104121477158500 Add documentation for vfio_device_get_region_info() and clarify the expectations around its usage. Cc: Alex Williamson Cc: C=C3=A9dric Le Goater Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Vivek Kasireddy --- include/hw/vfio/vfio-device.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index 35a5ec6d92..828a31c006 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -275,6 +275,19 @@ bool vfio_device_get_host_iommu_quirk_bypass_ro(VFIODe= vice *vbasedev, int vfio_device_get_feature(VFIODevice *vbasedev, struct vfio_device_feature *feature); =20 +/** + * Return the region info for a given region index. The region info includ= es + * details such as size, offset, and capabilities. Note that the returned + * info pointer is either a cached copy or newly allocated by + * vfio_device_get_region_info(), so the caller is not expected to allocate + * or free it. + * + * @vbasedev: #VFIODevice to use + * @index: region index + * @info: pointer to store the region info + * + * Returns 0 on success or a negative value on error. + */ int vfio_device_get_region_info(VFIODevice *vbasedev, int index, struct vfio_region_info **info); int vfio_device_get_region_info_type(VFIODevice *vbasedev, uint32_t type, --=20 2.50.1