[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 1/4] xen/arm: mpu: Introduce choice between MMU and MPU


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Wed, 18 Sep 2024 18:50:59 +0100
  • 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=gKC3XsyeACsYL3+HDNJWJBNlZL6CNaqXlu/q8ubsmFo=; b=zLxKl5oF9ovCFFiB1h+aaUbfhBi3aYn0/CTbfYtIarvIty4zn9JRs4SBq3oliUOQ+6iv/dVWR1R+I0S0R6D7j1tn0jp4WVqxqi5pX4PmkCti7qM/yqEThyQMmbSUKksgt8tALEyJqMXG98D5NeKRuuzJFdtnR4fIF0uk3LfbbKjcMD0s5RuBEJP1U6oiXEpM2gtmkUN8z+ck5QjlEfmCsyKdtCr+gSO9Hq+WtK6XXE3B/V+Ifnl9OVZWVtC1GijVQiV4qfwm0y+i2x2CbXBUkhpUCMqx8Ct0Nbvw6Ey1rigVA9V9OlGQ56uingdJ0G1Zw7OKazjjtI8Y97A76wEY0Q==
  • 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==
  • Cc: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 18 Sep 2024 17:51:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <ayan.kumar.halder@xxxxxxx>
---
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.
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.