From patchwork Wed Sep 18 17:50:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayan Kumar Halder X-Patchwork-Id: 13807062 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 61C14CDD54F for ; Wed, 18 Sep 2024 17:52:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.800378.1210298 (Exim 4.92) (envelope-from ) id 1sqyqH-0008H8-Lw; Wed, 18 Sep 2024 17:51:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 800378.1210298; Wed, 18 Sep 2024 17:51:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sqyqH-0008H1-JS; Wed, 18 Sep 2024 17:51:53 +0000 Received: by outflank-mailman (input) for mailman id 800378; Wed, 18 Sep 2024 17:51:51 +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 1sqyqF-0008Go-NJ for xen-devel@lists.xenproject.org; Wed, 18 Sep 2024 17:51:51 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061e.outbound.protection.outlook.com [2a01:111:f403:2416::61e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ad5297bf-75e6-11ef-99a2-01e77a169b0f; Wed, 18 Sep 2024 19:51:49 +0200 (CEST) Received: from BYAPR08CA0028.namprd08.prod.outlook.com (2603:10b6:a03:100::41) by LV2PR12MB5944.namprd12.prod.outlook.com (2603:10b6:408:14f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Wed, 18 Sep 2024 17:51:44 +0000 Received: from SJ1PEPF00001CE8.namprd03.prod.outlook.com (2603:10b6:a03:100:cafe::e6) by BYAPR08CA0028.outlook.office365.com (2603:10b6:a03:100::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.27 via Frontend Transport; Wed, 18 Sep 2024 17:51:44 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by SJ1PEPF00001CE8.mail.protection.outlook.com (10.167.242.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 17:51:43 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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; Wed, 18 Sep 2024 12:51:42 -0500 Received: from xcbayankuma40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 18 Sep 2024 12:51:41 -0500 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: ad5297bf-75e6-11ef-99a2-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xZEruCjEAvdZyssQ89l7YjfSTx6h7W1JXFIwWXMIZfF/d8/DIvMFJsLresaiekN2rmD/PJXlfQV0sdLS/NXHTxI+1HTVDy+ny4Ls8NqIe4Y1MLkhA8hDdL/4To5Ts7eCwLo/LUZuDX2HbCef5OAVd5IlzGswz0YRaUDWI9Gg1kUueO+WjB4dsSI4OexRqqVy6/muUfWhGvHHmz+75oQgI5MBl4wNvlas5nd0mV4rnntyjia1SQ64h/HbtDT8OogMswZTf7HRtYPtmcCuBndZgRJjRlFvHmEGUYPNPHr/Oy/oNv3MCeQr+6dC5LU8buoim7TW3ZcbhWHs2OvB5dUV1g== 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=gKC3XsyeACsYL3+HDNJWJBNlZL6CNaqXlu/q8ubsmFo=; b=zLxKl5oF9ovCFFiB1h+aaUbfhBi3aYn0/CTbfYtIarvIty4zn9JRs4SBq3oliUOQ+6iv/dVWR1R+I0S0R6D7j1tn0jp4WVqxqi5pX4PmkCti7qM/yqEThyQMmbSUKksgt8tALEyJqMXG98D5NeKRuuzJFdtnR4fIF0uk3LfbbKjcMD0s5RuBEJP1U6oiXEpM2gtmkUN8z+ck5QjlEfmCsyKdtCr+gSO9Hq+WtK6XXE3B/V+Ifnl9OVZWVtC1GijVQiV4qfwm0y+i2x2CbXBUkhpUCMqx8Ct0Nbvw6Ey1rigVA9V9OlGQ56uingdJ0G1Zw7OKazjjtI8Y97A76wEY0Q== 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=gKC3XsyeACsYL3+HDNJWJBNlZL6CNaqXlu/q8ubsmFo=; b=wMpyKmap8iVQnAlhp4NyaWZJBKWDNOHXKaD2bER9d+WSHPx1qQjrVIkkXyQ9i7k4pxXq+hqanandpYPx2mFaTNMHhkBtFqAtASB4KOP8DMJ10+I2ZNB/d58OyDBXGj2z8ZtVmbprkzYhhEYYz6hfXPgqAbkT8K9ZJjU3gBoVtHI= 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 , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini , "Bertrand Marquis" , Michal Orzel , Volodymyr Babchuk Subject: [PATCH v2 1/4] xen/arm: mpu: Introduce choice between MMU and MPU Date: Wed, 18 Sep 2024 18:50:59 +0100 Message-ID: <20240918175102.223076-2-ayan.kumar.halder@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240918175102.223076-1-ayan.kumar.halder@amd.com> References: <20240918175102.223076-1-ayan.kumar.halder@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: ayan.kumar.halder@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE8:EE_|LV2PR12MB5944:EE_ X-MS-Office365-Filtering-Correlation-Id: 64d39b26-64a7-41e1-6ef7-08dcd80a8eb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: eOKLW/V/17YJC7jFVYRe2/2w1nLShFiWNu5z1QVYY9SFpQGmiXL7eg50/+CzVH5acQCvfWPEZ5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K+YlOb+ax1SgbmVo4V/xQArkbWg+2UnBpcaAak1IpJSfge7UHO/qUpZU2Wm43t9y0e5bqZtSO/pf/lQy22/DniAXr7x0ozCOqT49L/Iw5ucJ3Zc/fUMeZCZkFkBIr9m09SlTUZmAf331WU0VaNWinOc8DzrDm6cBHBSZ7JAA82IeoI8w4sEi79izyKxBCmGF2opfhXhzKbzt8oJSJ/gfcxtKwMTe3bRCMhTRyu4SLnC+r6B+HnYEFajWPbK2KYydhyq0woonjJZBCEBJ8I/c0g4NzTaBhBSogJPBRQkqRsiaepKJNJo2zeELIh5J98VToH+ 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)(82310400026)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 17:51:43.3823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64d39b26-64a7-41e1-6ef7-08dcd80a8eb4 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: SJ1PEPF00001CE8.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5944 There are features in the forthcoming patches which are dependent on MPU. For eg fixed start address. Also, some of the Xen features (eg STATIC_MEMORY) will be selected by the MPU configuration. Thus, this patch introduces a choice between MMU and MPU for the type of memory management system. By default, MMU is selected. MPU is now gated by UNSUPPORTED. Updated SUPPORT.md to state that the support for MPU is experimental. Signed-off-by: Ayan Kumar Halder --- Changes from :- v1 - 1. Reworded the help messages. 2. Updated Support.md. SUPPORT.md | 1 + xen/arch/arm/Kconfig | 16 +++++++++++++++- xen/arch/arm/platforms/Kconfig | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index 23dd7e6424..3f6d788a43 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -40,6 +40,7 @@ supported in this document. Status, Xen in AArch64 mode: Supported Status, Xen in AArch32 mode: Tech Preview + Status, Xen with MPU: Experimental Status, Cortex A57 r0p0-r1p1: Supported, not security supported Status, Cortex A77 r0p0-r1p0: Supported, not security supported diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 323c967361..e881f5ba57 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -58,10 +58,24 @@ config PADDR_BITS default 40 if ARM_PA_BITS_40 default 48 if ARM_64 +choice + prompt "Memory management system" + default MMU if ARM + help + User can choose between the different forms of memory management system. + config MMU - def_bool y + bool "MMU" select HAS_PMAP select HAS_VMAP + help + Select it if you plan to run Xen on A-profile Armv7+ + +config MPU + bool "MPU" if UNSUPPORTED + help + Memory protection unit is supported on some Armv8-R systems (UNSUPPORTED). +endchoice source "arch/Kconfig" diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig index 76f7e76b1b..02322c259c 100644 --- a/xen/arch/arm/platforms/Kconfig +++ b/xen/arch/arm/platforms/Kconfig @@ -1,5 +1,5 @@ choice - prompt "Platform Support" + prompt "Platform Support" if MMU default ALL_PLAT help Choose which hardware platform to enable in Xen.