From nobody Fri Oct 31 03:41:12 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1755159641; cv=pass; d=zohomail.com; s=zohoarc; b=Bf6tHc05KmK8PJj79jxch6xlqScB77PxOWSN9qXL8EO/PZ1D5RTbA0qWEoiS9dmb+pHKEVsDTCe8lleWo2yu+QOyzlsCBs7LRoyifvzV2m9SMannet5TSSdjWM6nZakfb4CfHmgdsj2QtWd35uHqsEqrToDJ8KPn2wLcO8wclDc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755159641; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=diXe5/uLcabaESZz6UkvjwqUa3060riuACqXFLyGPyg=; b=CM3clmw5dUT4UX3jjPzftjLdHlv2si8AUrey95f5cZmdHprqQzprLOR9GOdYBQ+hCI+hV8ZuRXeX9vr86wZPYfQmAZQ7nw25ws0oP4Y2yzHLSRkpxMFKwWUn+a0viTaKJa/RBOEYzVt8NwTUSKiUyg4JTELPqAYNhsz6A/GsDZQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1755159641133425.3724674139547; Thu, 14 Aug 2025 01:20:41 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1081019.1441145 (Exim 4.92) (envelope-from ) id 1umTCA-0004JI-Nt; Thu, 14 Aug 2025 08:20:22 +0000 Received: by outflank-mailman (output) from mailman id 1081019.1441145; Thu, 14 Aug 2025 08:20:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1umTCA-0004JB-LB; Thu, 14 Aug 2025 08:20:22 +0000 Received: by outflank-mailman (input) for mailman id 1081019; Thu, 14 Aug 2025 08:20:22 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1umTC9-0004Iz-RC for xen-devel@lists.xenproject.org; Thu, 14 Aug 2025 08:20:21 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20631.outbound.protection.outlook.com [2a01:111:f403:2412::631]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 84b632ca-78e7-11f0-a328-13f23c93f187; Thu, 14 Aug 2025 10:20:21 +0200 (CEST) Received: from BN7PR02CA0006.namprd02.prod.outlook.com (2603:10b6:408:20::19) by SA5PPF9176ED2F1.namprd12.prod.outlook.com (2603:10b6:80f:fc04::8d7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9009.21; Thu, 14 Aug 2025 08:20:15 +0000 Received: from BL6PEPF00022573.namprd02.prod.outlook.com (2603:10b6:408:20:cafe::e5) by BN7PR02CA0006.outlook.office365.com (2603:10b6:408:20::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9031.16 via Frontend Transport; Thu, 14 Aug 2025 08:20:15 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF00022573.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.9031.11 via Frontend Transport; Thu, 14 Aug 2025 08:20:14 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 14 Aug 2025 03:20:11 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 14 Aug 2025 03:20:11 -0500 Received: from xcbayankuma40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 14 Aug 2025 03:20:10 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 84b632ca-78e7-11f0-a328-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hafKtuwQIP8PTmZX+DKZIabhmP4XK6k9LYfq0lG0iAto5HGa8JtKr+k24c8+rTZgcL5ZpXOxKMCi2qUy1gfctFxThvLFi7QFHqzGDyJu3VaI+uYWnBnn+lEYfYjDBgRW0HXgIe6wjtdmVGDehV0ixNHtvwgtk9xo+OIdziUgsCoaQF+6i/SccuXIw9CMclFCRyZhvTDzRHrDwawp/dIvGgK0IXggpRiG6SdrV8t3JYD5hAkm1hh12USIxIOoYEf+wW7NZ0Uy1VcOOKsTXjxcESqa1ApKt9it5D5ZsM/sLTyIvtxxg6tv9W6II00HnqftuUwHltYmk31Za8zvJtsjRw== 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=diXe5/uLcabaESZz6UkvjwqUa3060riuACqXFLyGPyg=; b=Z3DzX6wiOrmk1XI5tIWtN/L3w/dkmpUbA0aPpnR8LmIhvMekNwuz+uf3GWWrz5lc6k3mwNQDymaHFVrLLf02C6HJSJ85gt41aXT0yWyiKPJ+UT+716dY13YwkLuDV8giZeNFNmnjyU5Uph9y81QJntFsQ0cXrR7xSMrdvuJ5jIfd5oTai3tgq8PgpNiym3ZE+Xbyne00sL+lZc5GCOfiYpvg6sGSEiyIG4N8J90qa/1nqcr/mzIDfECXqjg5neAZBBY4ROEhIGixp+xbzuh4YA+lEN2++jSvdQTqZZsFbI2XnaZxac5HPiA2HthKY0C93HT+/19XpcaDF+JcwArBxg== 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=diXe5/uLcabaESZz6UkvjwqUa3060riuACqXFLyGPyg=; b=ptyriUHtB2+BjR1PxVPaMRqXfOK6dNodZkaRZ6ck80UV4hvKDlTJF86E+KpGbusIfwYeo4WtOXnikiU09xVSAI5Un3IlSH7vz4BdI0C34SuToa+qKXaNBLM5ErYL1Menkl+uVqkgoAsa6wB4cg3FjvjfCTZbcxFyXHWjkewfvfQ= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Ayan Kumar Halder To: CC: Ayan Kumar Halder , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , "Volodymyr Babchuk" Subject: [PATCH v2 1/2] arm/mpu: Enable is_xen_heap_page and is_xen_heap_mfn for ARM_32 Date: Thu, 14 Aug 2025 09:19:58 +0100 Message-ID: <20250814081959.3504145-2-ayan.kumar.halder@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250814081959.3504145-1-ayan.kumar.halder@amd.com> References: <20250814081959.3504145-1-ayan.kumar.halder@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: None (SATLEXMB05.amd.com: ayan.kumar.halder@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022573:EE_|SA5PPF9176ED2F1:EE_ X-MS-Office365-Filtering-Correlation-Id: bed1fd0a-88ac-42c8-c0bb-08dddb0b657e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?QD+ZwxooAZ9H6xWipmD+6vb0uZ7EhgrFL6fkT/vCIlku3UcqhQoulxdrv/8w?= =?us-ascii?Q?8uLuzQm9FfaAHZDj1+45Piam81dCLEleyprxDodksAqtsAeeixGqWQ3rsQPZ?= =?us-ascii?Q?EK0i6kecG/oQXyAH9VBgIdL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Q?bIQ12C6+9mHDbP36wtlpdWMoxeyIL4FnDKQxSRYaMWTcaJpDzQUvub6FpNUG?= =?us-ascii?Q?rm6JEfqFN1+ehJVOsK0flE8pVLPEmhVR852Wrv9AsjTPLqfd9zhbdJao9uIq?= =?us-ascii?Q?uYz8xCTJxApo9j8yPEy7ZofLNBVUvfBp5sSN1ehwueOtqoEeBvoQhDmli8o2?= =?us-ascii?Q?S4Jbdna6ZA1iMXH8bBX6tdg/BJuUNkY114H5Jp8YT0uUD6OdQMLhqH66zzvY?= =?us-ascii?Q?p1LRqt36x7qY6TBnbkUI3wUxZkwIb+GfVmoQaCP6+u+xHPdvMisBzvck3b1A?= =?us-ascii?Q?w/WuffoppSowhkwpgmN3cBvUCBVYUPFJ+8YR0tpxDgc4BLPF8JvwG87uTyKB?= =?us-ascii?Q?FmHSLuowE0e3OoXzhMNchL4r5PDb+syC6QoRC3jDkFBNEavbslsay+H6Qlf2?= =?us-ascii?Q?ijUH8ZF3UiOZAdfQVZrOAsXG9unCJM8SFlXY3Gkq5/RhKzOxl+CGk+pjf9Jv?= =?us-ascii?Q?JCf2zFJvAAhpyDnWFLgHLyeQpJCKXlSIbffC?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2025 08:20:14.9968 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bed1fd0a-88ac-42c8-c0bb-08dddb0b657e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00022573.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA5PPF9176ED2F1 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1755159643338124100 Content-Type: text/plain; charset="utf-8" In case of ARM_32, all of the RAM will be covered by a permanent contiguous mapping (where VA =3D=3D PA) and there will be a single heap. Thus, the mem= ory allocated from Xen heap uses PGC_xen_heap. This is similar to the scenario described for "CONFIG_SEPARATE_XENHEAP=3Dn W/ DIRECT MAP OF ALL RAM" in common/page_alloc= .c. Signed-off-by: Ayan Kumar Halder Reviewed-by: Hari Limaye Reviewed-by: Michal Orzel Tested-by: Hari Limaye --- Changes from :- v1 - 1. Enable is_xen_heap_page() and is_xen_heap_mfn() definitions for ARM= _64 or MPU (fixed a build break). xen/arch/arm/include/asm/mm.h | 2 +- xen/arch/arm/include/asm/mpu/mm.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h index fb79aeb088..7a93dad2ed 100644 --- a/xen/arch/arm/include/asm/mm.h +++ b/xen/arch/arm/include/asm/mm.h @@ -170,7 +170,7 @@ struct page_info #define _PGC_need_scrub _PGC_allocated #define PGC_need_scrub PGC_allocated =20 -#ifdef CONFIG_ARM_64 +#if defined(CONFIG_ARM_64) || defined(CONFIG_MPU) #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap) #define is_xen_heap_mfn(mfn) \ (mfn_valid(mfn) && is_xen_heap_page(mfn_to_page(mfn))) diff --git a/xen/arch/arm/include/asm/mpu/mm.h b/xen/arch/arm/include/asm/m= pu/mm.h index c32fac8905..e1ded6521d 100644 --- a/xen/arch/arm/include/asm/mpu/mm.h +++ b/xen/arch/arm/include/asm/mpu/mm.h @@ -27,11 +27,6 @@ extern pr_t xen_mpumap[MAX_MPU_REGION_NR]; =20 #define virt_to_maddr(va) ((paddr_t)((vaddr_t)(va) & PADDR_MASK)) =20 -#ifdef CONFIG_ARM_32 -#define is_xen_heap_page(page) ({ BUG_ON("unimplemented"); false; }) -#define is_xen_heap_mfn(mfn) ({ BUG_ON("unimplemented"); false; }) -#endif - /* On MPU systems there is no translation, ma =3D=3D va. */ static inline void *maddr_to_virt(paddr_t ma) { --=20 2.25.1