[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 2/3] xen: introduce shared_info_to_gfn()
- To: Penny Zheng <Penny.Zheng@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <alejandro.garciavallejo@xxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Tue, 31 Mar 2026 10:21:19 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/L6G/yvrhwe8kYL+KglZ+wUrVvLl0a/tWctidtfUUEY=; b=pGmEOvWfkFt/F4VC2AkhArdFTZhnnkNNMwGiO4YZNfQjOrXb+8SVnPPXY9NcWHeQExqYdLdjzMncWim++pQdhgSd8JBnS8wzc9KaXGmBrwaUU5ch9PGZfLd4l8eXFOX3J/fKN+pFOQu72c78qsXf+LI7diyEUCemR+HgSxtF13HlDCpEjay9emDIlyKeX1TsLJ0Paz8AXtFxpmznfvO3Hh0iGjvMb0+MOM3Ahh3Ol/n/4/L645qQW0pnzEIKfWc2Z4AbL9aQWWK5nBCn0d4+nq70bqnVl/1a2M/A/Viv9gCW/3MNVUsr7oqYXX0fsy2ufXBgNv8D8cDgZGqBmwBTvA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bHWnIMyI3QNfe7GTjl2Zn7Kn20nWe/8/MeQ/U6Bq0ywboDAhsXEvHO+u4Vde/Ut+8Ity2n8aqCUIXMh3xReS9d4QVlidTEsdQ+vEKgAWmEucmAhZj8oLVgTybHOBUpa1Y3vvCwrrEeamIWIM4xvQgWngAM18rGrnRzWcaUmQRRx1zaLzIyjlwXamM8EuHvupNCPl7kNlgSzJ/qjg17t6LJSIb69KBsclrFAgPCUlULdm2iQh2jUzr2HZTlNaxKiThp2iUWyPu+socojbcd9PtLEcmSOtuAL09jNhJwIezNpBeTiKEsychYA4RE1o81w3YEBAJBJyQKGjyRd80ODNLw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: <ray.huang@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 31 Mar 2026 08:21:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 27/03/2026 08:50, Penny Zheng wrote:
> On ARM, mfn_to_gfn() is a simple identity macro that actually does not return
> the correct GFN for domains other than direct-map ones, so getdomaininfo() is
> returning the wrong shared_info_frame on ARM.
>
> Introduce a common shared_info_to_gfn(d) macro to output correct GFN for both
> ARM and x86 in getdomaininfo():
> - ARM: uses page_get_xenheap_gfn() to read the stored GFN
> - x86: simply wraps the existing mfn_to_gfn() solution which consults the M2P
> table
>
> Suggested-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> ---
> xen/arch/arm/include/asm/mm.h | 2 ++
> xen/arch/x86/include/asm/p2m.h | 3 +++
> xen/common/domctl.c | 3 +--
Seeing you only added this macro for Arm and x86, the RISCV and PPC builds will
likely fail to build.
Other than that, I agree with Jan that this requires a Fixes tag and the changes
look good.
~Michal
|