From nobody Sun Jan 25 12:00:09 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=1769149379; cv=none; d=zohomail.com; s=zohoarc; b=kdhSiE5mSUWtAzAaconAok0CVhuhrUCC573VBnO6y5sQpHDbbvHfAItZDNEeY2Qs5H6hm88Hq9/6Cb0flYzLwNagpJzFi7GIYqtQ2tL3WoRCQfzq5+hs0DUjQ2vlUztLTljDBrfIHDdWc/zCOw9kXbpkhStrl7fp2HIgylk2Enc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769149379; 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=HGnLkJXIaPZ2SlGk3KqwSWv5BCbpo8F8ZNOyt7sLmoU=; b=bHWeDyGBps6ovRQkdFz4qzViW0pgcJW0p1Zg9WLmK0Sgq0xKpYKX7XmeavhQFsFN7+NzexgL5r/BiCNarQFiV/SfSdONc8fJ0DF3fHhXcbLPTTzuQL3shj6bF8/HD4MZuzAe+D770sb0PS3I68rbEm2MTi3A2pby3cd4gpC1r+k= 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 1769149379664153.64313015241044; Thu, 22 Jan 2026 22:22:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjAYk-0003AG-QB; Fri, 23 Jan 2026 01:22:18 -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 1vjAYi-000397-V1 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 01:22:16 -0500 Received: from mgamail.intel.com ([198.175.65.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vjAYh-0000rq-5X for qemu-devel@nongnu.org; Fri, 23 Jan 2026 01:22:16 -0500 Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2026 22:22:06 -0800 Received: from unknown (HELO vkasired-desk2.fm.intel.com) ([10.105.128.132]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2026 22:22:04 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1769149335; x=1800685335; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=euo1uQzGYAUaN3wijSuUW/9xkovcGHGFmf0Ishxos5A=; b=IYkwDtfjyS0dszTdNZSUOa5hex5InaSMuxd3KygNcvbB/e73NwD/oo2j z6iKgogJ6C5OZ/IaJdqPILmNcOQDIc91B4H1ukVmUq0Dsf8wmugCKVmhm IH9TylQG47zEyNcJugJSG62WVBmcX192Agyy8qYNj9rnpc2M237sKpfff hQhdhB3u/BsDnqGkmAumGYtWZNf7wfZvgWCdLm8cZMVzEW+VwMUEsHqxp pEMDA7Fw/xOTNNFxuMQP8iuo779zb/DCHE9lrBbbpAciv7LIRgO7LlRyL 8S8K0NvGhwj3Ti5ahTsNjTOr4pU3ctxlwYxySisZe1B8lI+mho8I2ymHA A==; X-CSE-ConnectionGUID: YhhtwwHmQHOjnivZmy3Mxg== X-CSE-MsgGUID: UjC0aWzUTDmTmDb75WR4OQ== X-IronPort-AV: E=McAfee;i="6800,10657,11679"; a="74254194" X-IronPort-AV: E=Sophos;i="6.21,247,1763452800"; d="scan'208";a="74254194" X-CSE-ConnectionGUID: ovjVwv9cQS6fQ83seOwfoA== X-CSE-MsgGUID: uy27e5PISHSqvZ0wKDP1Gg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,247,1763452800"; d="scan'208";a="207287406" From: Vivek Kasireddy To: qemu-devel@nongnu.org Cc: Vivek Kasireddy , Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v4 3/8] vfio: Document vfio_device_get_region_info() Date: Thu, 22 Jan 2026 22:17:42 -0800 Message-ID: <20260123062042.568703-4-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260123062042.568703-1-vivek.kasireddy@intel.com> References: <20260123062042.568703-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=198.175.65.14; envelope-from=vivek.kasireddy@intel.com; helo=mgamail.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.07, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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: 1769149408754158500 Add documentation for vfio_device_get_region_info() and clarify the expectations around its usage. Cc: Alex Williamson Cc: 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