From patchwork Tue Mar 4 17:57:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayan Kumar Halder X-Patchwork-Id: 14001222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E224C282D2 for ; Tue, 4 Mar 2025 17:57:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.901397.1309348 (Exim 4.92) (envelope-from ) id 1tpWWD-00028d-0A; Tue, 04 Mar 2025 17:57:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 901397.1309348; Tue, 04 Mar 2025 17:57:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tpWWC-00028W-Th; Tue, 04 Mar 2025 17:57:24 +0000 Received: by outflank-mailman (input) for mailman id 901397; Tue, 04 Mar 2025 17:57:24 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tpWWB-00028H-Tu for xen-devel@lists.xenproject.org; Tue, 04 Mar 2025 17:57:24 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061c.outbound.protection.outlook.com [2a01:111:f403:2415::61c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1ddd67da-f922-11ef-9898-31a8f345e629; Tue, 04 Mar 2025 18:57:21 +0100 (CET) Received: from BN9PR03CA0243.namprd03.prod.outlook.com (2603:10b6:408:ff::8) by IA1PR12MB6434.namprd12.prod.outlook.com (2603:10b6:208:3ae::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.25; Tue, 4 Mar 2025 17:57:16 +0000 Received: from BL6PEPF0001AB73.namprd02.prod.outlook.com (2603:10b6:408:ff:cafe::79) by BN9PR03CA0243.outlook.office365.com (2603:10b6:408:ff::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.29 via Frontend Transport; Tue, 4 Mar 2025 17:57:16 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF0001AB73.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8511.15 via Frontend Transport; Tue, 4 Mar 2025 17:57:16 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Tue, 4 Mar 2025 11:57:15 -0600 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; Tue, 4 Mar 2025 11:57:14 -0600 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: 1ddd67da-f922-11ef-9898-31a8f345e629 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JkH8BwUeLcXo0o0zDoJW7gE/ozHjdm9XeeVF8tpDcQUbIrO7PxjE9d26GGmnX0oE3PP9CSzimMFhX2GOZJQlIV5BLIuduBbqZM7OEr8uVsuSYHVE8Rg641+ahwJBY1WvAjp5ecXbvYzdOwLNqQuUCvd/C3GpUNcAeyb+8wzjwFkW3WQq6o7YwhR/XUFsVUP9/Sdj9GDkc4lhEgBJONBtSNUd5buV/SPNimP4TNI7Fwx5XtQ0UsBNQWl2wU/UIVCzzYXsWPC3fl12a/LFUb1x9wLlVNOxjlXDCdnVEh/Q9EONyRtAGEh+Nl8DIel51q5rshPOjABbpI03iaGoULVcNg== 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=QKTVadEnV2XlS26fisnGV/12/rYhJQtYA0RCgoYLxCI=; b=jawy5uO8kfmDdbdrV+TWTvEsoWjYnCpIS8vugJ9/ZpPajLDnInnGv4Wxqle+BtUwvS0Sk+oyDa67xoAuPRC36RPsNAfsKQ/oZzuiEeo5tZs5Kvj1CRCgINtNPrgskKQswTe1Z12Q2y8Mujm99hxzhGqbx0jvKzIJllEiG7Qnpn9x/4uiM8rS3d/9l5taYGJdhcqMrtqGkkddRJBvaeNSaEUYZKJnkS+yQBdpwAaExO5jrM7jzoD036t4NDPv1VQl9vmt+4R5jm6jf7+cNDNZEO3ERJpt5Edg+PpePalwcYUqkmo86uemigEvtMAi7VD4xByy6eJYehMr3cixNTmSjA== 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=QKTVadEnV2XlS26fisnGV/12/rYhJQtYA0RCgoYLxCI=; b=Prvnr1UfgCKU6oCwJV59IZ0iCr/8sO6tjEgoRtVQgTy97vkzRYmuEb3DGf2byeWJpkITD4JOi0/OMYdEDkzZW1/N32AEF8cimK3eYxTqSnOOjc6cUkaovMX2R5YBX8vyC6FxqVGpXo+rF+rrQTNM9k/OaYtYw8vcCTLoGQVJEoE= 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 (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" , Luca Fancellu Subject: [PATCH v2 1/2] xen/arm: mpu: Move some of the definitions to common file Date: Tue, 4 Mar 2025 17:57:07 +0000 Message-ID: <20250304175708.2434519-2-ayan.kumar.halder@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250304175708.2434519-1-ayan.kumar.halder@amd.com> References: <20250304175708.2434519-1-ayan.kumar.halder@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: ayan.kumar.halder@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB73:EE_|IA1PR12MB6434:EE_ X-MS-Office365-Filtering-Correlation-Id: 83628057-b510-468e-65ae-08dd5b460005 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: pKRj53YUYcml1bhsZeQkBvOqZQMLPrALYNATyLJUgzhCmamaeG5fWOg2hni6V5aiq3sG+z2Ib5s7UyGw9S2ydM67C7xprIdCkKneC2prGCBlOBIiMdd9/wpswVYzU1dkbwZwGxMNA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LLUD53g/fSJvlyQDjl78kNbmXSj2+xGX7V0KAGfOlc2O1NZwDJ5lBI3pXWITwhmr4d9QgEK0eZTNnu9xUKzz2oVsvGZXZjpXBrXP6Vx7HvhV0aPyoXmda1b7WAIHlZSISzq3wm/jtDKBy4P+ibK7OeQk/BcGrUybABcQWfyNWSk0O1gttuSGUz4NIrzOZlyu+cGvLTw+gxUkxGazWQ5DrJl6AObOmjRvOkiQ6LPwGTWQiQLnbPGnUAwdn3bzsroVRh9EyfSBh4VP9Ne9pLRKsqoBERlgN7ETlDvsvNKgfRs33IFDEq3G7wYs= 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)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2025 17:57:16.2357 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83628057-b510-468e-65ae-08dd5b460005 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: BL6PEPF0001AB73.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6434 For AArch32, refer to ARM DDI 0568A.c ID110520. MPU_REGION_SHIFT is same between AArch32 and AArch64 (HPRBAR). Also, NUM_MPU_REGIONS_SHIFT is same between AArch32 and AArch64 (HMPUIR). Signed-off-by: Ayan Kumar Halder Reviewed-by: Luca Fancellu Acked-by: Michal Orzel --- Changes from v1 - 1. Add the R-b. xen/arch/arm/arm64/mpu/head.S | 2 +- xen/arch/arm/include/asm/early_printk.h | 2 +- xen/arch/arm/include/asm/{arm64 => }/mpu.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename xen/arch/arm/include/asm/{arm64 => }/mpu.h (87%) diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S index e4f2021f45..7b659aa42b 100644 --- a/xen/arch/arm/arm64/mpu/head.S +++ b/xen/arch/arm/arm64/mpu/head.S @@ -3,7 +3,7 @@ * Start-of-day code for an Armv8-R MPU system. */ -#include +#include #include /* Backgroud region enable/disable */ diff --git a/xen/arch/arm/include/asm/early_printk.h b/xen/arch/arm/include/asm/early_printk.h index 219705a8b6..644fd0fcfb 100644 --- a/xen/arch/arm/include/asm/early_printk.h +++ b/xen/arch/arm/include/asm/early_printk.h @@ -11,7 +11,7 @@ #define __ARM_EARLY_PRINTK_H__ #include -#include +#include #include #ifdef CONFIG_EARLY_PRINTK diff --git a/xen/arch/arm/include/asm/arm64/mpu.h b/xen/arch/arm/include/asm/mpu.h similarity index 87% rename from xen/arch/arm/include/asm/arm64/mpu.h rename to xen/arch/arm/include/asm/mpu.h index f8a029f1a1..40fa6eaaca 100644 --- a/xen/arch/arm/include/asm/arm64/mpu.h +++ b/xen/arch/arm/include/asm/mpu.h @@ -3,8 +3,8 @@ * mpu.h: Arm Memory Protection Unit definitions. */ -#ifndef __ARM64_MPU_H__ -#define __ARM64_MPU_H__ +#ifndef __ARM_MPU_H__ +#define __ARM_MPU_H__ #define MPU_REGION_SHIFT 6 #define MPU_REGION_ALIGN (_AC(1, UL) << MPU_REGION_SHIFT) @@ -13,7 +13,7 @@ #define NUM_MPU_REGIONS_SHIFT 8 #define NUM_MPU_REGIONS (_AC(1, UL) << NUM_MPU_REGIONS_SHIFT) #define NUM_MPU_REGIONS_MASK (NUM_MPU_REGIONS - 1) -#endif /* __ARM64_MPU_H__ */ +#endif /* __ARM_MPU_H__ */ /* * Local variables: From patchwork Tue Mar 4 17:57:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayan Kumar Halder X-Patchwork-Id: 14001221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB394C021B8 for ; Tue, 4 Mar 2025 17:57:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.901399.1309368 (Exim 4.92) (envelope-from ) id 1tpWWJ-0002cp-Eu; Tue, 04 Mar 2025 17:57:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 901399.1309368; Tue, 04 Mar 2025 17:57:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tpWWJ-0002ci-CE; Tue, 04 Mar 2025 17:57:31 +0000 Received: by outflank-mailman (input) for mailman id 901399; Tue, 04 Mar 2025 17:57:29 +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 1tpWWH-0002bP-Ef for xen-devel@lists.xenproject.org; Tue, 04 Mar 2025 17:57:29 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061b.outbound.protection.outlook.com [2a01:111:f403:200a::61b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 22e7851c-f922-11ef-9ab4-95dc52dad729; Tue, 04 Mar 2025 18:57:28 +0100 (CET) Received: from CH0PR03CA0005.namprd03.prod.outlook.com (2603:10b6:610:b0::10) by PH7PR12MB9076.namprd12.prod.outlook.com (2603:10b6:510:2f6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.25; Tue, 4 Mar 2025 17:57:22 +0000 Received: from CH1PEPF0000AD81.namprd04.prod.outlook.com (2603:10b6:610:b0:cafe::95) by CH0PR03CA0005.outlook.office365.com (2603:10b6:610:b0::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.26 via Frontend Transport; Tue, 4 Mar 2025 17:57:22 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by CH1PEPF0000AD81.mail.protection.outlook.com (10.167.244.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8511.15 via Frontend Transport; Tue, 4 Mar 2025 17:57:22 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 4 Mar 2025 11:57:22 -0600 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; Tue, 4 Mar 2025 11:57:21 -0600 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; Tue, 4 Mar 2025 11:57:21 -0600 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: 22e7851c-f922-11ef-9ab4-95dc52dad729 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vJbSa7SsJdIyXzlL7mzYxSo5m999al7I8FVUQi/xRAtab1H0rxE2P097ZvaxZvapoRcYDAhMVvgkWDqKOibwO8d6NhWh53eHvMzVkAuIZ23a5uRlow3d7EfXOSgRs5agGxPvJ9B65TyrIU3m8ElAhTiTYCm5iNiSfsKqLU4abQZ1VnyIxI+i0xKfXS11nw98viQoqUBdCSyfFTlkF6MyRtcfuR4fj2tQoRISPJ/AHuOEWnpGmPQqCBo5JiLetPfAHXoDEmpc/YSh0lLb/91FqOa3QUilFI38IIUGFCSo+1aprZMtyQ8LsFk0iW6NC7ukMAwdLBwzqnPmQgaGPys4/g== 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=74iqe/njp1ZHRrCH+t3KUD+MLgSw6RTgd/onIA8MIFY=; b=OgB/IN5TRXVX0jw/dXVcQlBfmgWGc6hXq5DGcxxx2Mu36JQL5XFiV0nZj06OTDfNEwiWrNpelY4jePfWnrEcar7nuQ7NYapECbkZUJscCsJRiAhEZBALur7FChW+xjs+GX1JqsIg/QVrfPzl7MIpi2eN+W14mL8kAZlVhmpB1QsUO5Frk0iKxHlc83I5DVoYU6NjoVzwPKxO4OpaCy0q4GPCGO/eF7a/hMp7AIB/gWhtW6bMKzv6C915FmnKf30mnOdncFbA1wlEbjln4S3MjrP+y0Hchb6OqSs5gypTzLfNTDw2T0q6in8lxDEQtb1HglhD/z5gDizH7znl/7jOsg== 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=74iqe/njp1ZHRrCH+t3KUD+MLgSw6RTgd/onIA8MIFY=; b=n+6qrNANA8RzQbpkyWeKhs88FVMTQ7e5r3dahZ8tMhlJgXfPREptI6oy40pF9iCfllrYPDoDbTsL8tk5IttChfXOvN/kglMtSBw9bIKz8k6lkCBkQ7jfchrQE6NgWV5tCl41rX46Jxzi3SJMw/qIi35nnndvYnOhauU/LoIzmB0= 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 (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=SATLEXMB03.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 2/2] xen/arm: mpu: Ensure that the page size is 4KB Date: Tue, 4 Mar 2025 17:57:08 +0000 Message-ID: <20250304175708.2434519-3-ayan.kumar.halder@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250304175708.2434519-1-ayan.kumar.halder@amd.com> References: <20250304175708.2434519-1-ayan.kumar.halder@amd.com> MIME-Version: 1.0 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: CH1PEPF0000AD81:EE_|PH7PR12MB9076:EE_ X-MS-Office365-Filtering-Correlation-Id: 63eccace-5690-4806-1dd0-08dd5b4603cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310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YqD3oSpt9XuMlexaRiB9q0q8NKlAU6dYdcevyhKo/Je5121P7B3oSTGW4XsLn7zqqC25F1KuDob+/URXmREsVAgj1rNoPEh2U9/ifzG0V6MvPdweKzGBv41ufrhpKlDyQt7bXh8T6OL06Xtw29SwfxETvXXQyK3kqKvR+JrsfeD4iIeHYK+96qTjV4jKKnp/V4e0QV2YKh47L2IWy+IUfaaGPaKc46CYPYkjhy6lUanZrIHrFF00SfmXs6z8OVPEYJx4EsZ6mX7j+ziHewS0mLNZaFxS09o3aVj9tLt/pwZWKfCiCZMly5FMWJzyTCWa7CCwZ8W+M1y3tag+zA4Kd36eoP8q+WeezyJmCMspAcQ1Z4yBNJRSuS7Mrz9FZ4gO8O1T2OmJLVVa5Z6JaYwQrh9jWNqzVfN7zoN92jFjFxK5Kd3OAjP8VegSKsiA3OKuAra5PxRSjPEcSL1Mk= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2025 17:57:22.5178 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63eccace-5690-4806-1dd0-08dd5b4603cb 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD81.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9076 Similar to commit (d736b6eb451b, "xen/arm: mpu: Define Xen start address for MPU systems"), one needs to add a build assertion to ensure that the page size is 4KB on arm32 based systems as well. The existing build assertion is moved under "xen/arch/arm/mpu" as it applies for both arm64 and arm32 based systems. Signed-off-by: Ayan Kumar Halder Acked-by: Michal Orzel Reviewed-by: Luca Fancellu --- Changes from :- v1 - 1. Extracted the changes to a common file. (I have dropped Luca's R-b as there were code changes.) xen/arch/arm/Makefile | 1 + xen/arch/arm/arm64/mpu/Makefile | 1 - xen/arch/arm/mpu/Makefile | 1 + xen/arch/arm/{arm64 => }/mpu/mm.c | 0 4 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 xen/arch/arm/mpu/Makefile rename xen/arch/arm/{arm64 => }/mpu/mm.c (100%) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 43ab5e8f25..fb0948f067 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -1,6 +1,7 @@ obj-$(CONFIG_ARM_32) += arm32/ obj-$(CONFIG_ARM_64) += arm64/ obj-$(CONFIG_MMU) += mmu/ +obj-$(CONFIG_MPU) += mpu/ obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_HAS_PCI) += pci/ ifneq ($(CONFIG_NO_PLAT),y) diff --git a/xen/arch/arm/arm64/mpu/Makefile b/xen/arch/arm/arm64/mpu/Makefile index a8a750a3d0..3340058c08 100644 --- a/xen/arch/arm/arm64/mpu/Makefile +++ b/xen/arch/arm/arm64/mpu/Makefile @@ -1,2 +1 @@ obj-y += head.o -obj-y += mm.o diff --git a/xen/arch/arm/mpu/Makefile b/xen/arch/arm/mpu/Makefile new file mode 100644 index 0000000000..b18cec4836 --- /dev/null +++ b/xen/arch/arm/mpu/Makefile @@ -0,0 +1 @@ +obj-y += mm.o diff --git a/xen/arch/arm/arm64/mpu/mm.c b/xen/arch/arm/mpu/mm.c similarity index 100% rename from xen/arch/arm/arm64/mpu/mm.c rename to xen/arch/arm/mpu/mm.c