From nobody Fri Nov 14 23:29:46 2025 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=1762666789; cv=none; d=zohomail.com; s=zohoarc; b=aODYN0SZp6BWbtcvd0bYSJl4rXOgiJhcsQW+DJiMqgiexLYnRQoEXon+SvuRomDDkjJHzDXpVbqKHInGOyh1w6QleYr7l5n/q/ybqRGmvyHk1zwpNE0DcJEo9sYIfxEddjIUug2KBA3Um+eXmHSYBWetWreelDQi8lnsGvJast8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762666789; 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=3mFUSHo00QC6GQYcVLbxHXrviSlPeb3q5CMGM+onVI0=; b=ly7171JDFUia43EIw1G/qeCse/chHaX2txTX6VuYEVAAC+kFtD+yVK9fAm32JbpdT73gxu/69qTqNKeOAqLCHEJHO6ReQHIR7AjTFbKqnRARf9WHY9GaTWvNTDUcbp5U6pUAuYVwodamXTphefm4hb1T0vz/yKip4Yqym5GNhoc= 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 1762666789203769.047101064049; Sat, 8 Nov 2025 21:39:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vHy8Y-0005VT-DC; Sun, 09 Nov 2025 00:38:50 -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 1vHy8V-0005Uo-L4 for qemu-devel@nongnu.org; Sun, 09 Nov 2025 00:38:47 -0500 Received: from mgamail.intel.com ([192.198.163.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vHy8T-0007Zb-ET for qemu-devel@nongnu.org; Sun, 09 Nov 2025 00:38:47 -0500 Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2025 21:38:40 -0800 Received: from vkasired-desk2.fm.intel.com ([10.105.128.132]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2025 21:38:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762666726; x=1794202726; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UEXmJpHXry9uVp0udXAUcXCrJOZasoHnLtLQA+q5aD8=; b=gJsJN5H2Ajb7yBV4m3uyIUlXS5xuBFewSoxYCOGNcVfVZ+7zGVm5idaT Ecz7QwF/CooX7lv08Nj7I6TuEvI0e5JJ81Bd38MmCt/+oiPINflLT3oxu QdgF3beDHK/UENRZPu/fStyae9nyQp6q4wWeOY0bN+PLZ1lkKtlE4yvzp pQ7YY8fFfs2sJsaq0kR2BfXF7oIAY0a3+LBWHNFAzNz65jb2c+mDrwM9G kWDpmhHf8scyL0cOIGOELOlgncbopNtYNeXgUG6GXDBbl6Rxr8lHQAH2Z j/9i+qyhGi2DPlXJ7fn8TEc3pk6CwFEvdzpRxf+SIDuqnz0VpPo0DIHVT A==; X-CSE-ConnectionGUID: fLjBmDaSTcK8v+bwFS4GEA== X-CSE-MsgGUID: 9jqWHm5+RwS0qlla1y8TEw== X-IronPort-AV: E=McAfee;i="6800,10657,11607"; a="63965787" X-IronPort-AV: E=Sophos;i="6.19,291,1754982000"; d="scan'208";a="63965787" X-CSE-ConnectionGUID: 0ZOIRkr7ROWAIC+/oLTKWA== X-CSE-MsgGUID: EDTvSXURTBuNYhl1vXc/ew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,291,1754982000"; d="scan'208";a="188129049" From: Vivek Kasireddy To: qemu-devel@nongnu.org Cc: Vivek Kasireddy , Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v2 03/10] vfio: Document vfio_device_get_region_info() Date: Sat, 8 Nov 2025 21:33:46 -0800 Message-ID: <20251109053801.2267149-4-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251109053801.2267149-1-vivek.kasireddy@intel.com> References: <20251109053801.2267149-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.18; 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_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: 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: 1762666792446158500 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 0fe6c60ba2..bb28123faf 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -257,6 +257,19 @@ void vfio_device_prepare(VFIODevice *vbasedev, VFIOCon= tainer *bcontainer, =20 void vfio_device_unprepare(VFIODevice *vbasedev); =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