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

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


  • To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Wed, 28 Aug 2024 15:44:13 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=57kOUV1e3r30yTAw2PXgm+rGElW+7eDATI09QVN1qB4=; b=fOslr9mZVYRF4owRP6OwxdN4bg2ukKZjuMD6qCMJlzObaaxBxanqckB9i4WyLQrzicpqt8sNm5YNF0/uJUuM8f9F8gNl1D//wgL23jHEO3+QH9SfWHi8THrL/3y4aL2xzbAjqndS+d8+TKX+vKEUsbOjNpQzt5yMNLF1J08PngT0gSzSb6RiEXiAFqQhH5R9HoVwVnA96AeWihFob0axFXpxAYNnBJEng4m/3MHWN3a79YezFKTZQgxynjN3CURMX/KiDCmA0pPx4terwQwuoCnpU4GUHzECx5JpJB4jYbvOWMMDxE0DR6zQeXVbOoZGrm5PsX8fU0v0NiqHqiMeSA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uO7ibVPqqnX2+cS37HiNxEnecc5sA9oWJtMGdhSUJAMbPHfUhF7k5HqCAbdc7E28ptWqDIoGBOa2QGV7lgnqk7J4SUAGEPJ9Ji1PBaDaBuOD4BzzUoGVxCCxNOlnTbvFe6AG0wtRo8MXh5u5UNvEu+X6/mok2S2RJnHae0aAi9f2NqZOCKnndzFoJVHp4Lmcv6h90DZXIq9XxdxSebNWYTm4o2LsA3t7C5qfYZ4dq2q1WRIiVZMs/WLYTLy+7Le9nD+8L7oNPr9j+jm4lBU1DpHjqNypmhCB4sXGFXD7f2+1XmvyKqaMPiSFfKgoMvs+BD3BqILZ1lPq1FRau4SZ/w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 28 Aug 2024 14:44:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 27/08/2024 11:37, Julien Grall wrote:
Hi,
Hi Julien,

On 23/08/2024 17:31, Ayan Kumar Halder wrote:
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.
All the current platforms are now made dependent on MMU.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
  xen/arch/arm/Kconfig           | 17 ++++++++++++++++-
  xen/arch/arm/platforms/Kconfig |  2 +-
  2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 323c967361..686948cefd 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -58,10 +58,25 @@ 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.
+      Most of the Arm based systems support MMU.

I feel this is quite subjective. So I would drop it.
Agreed.

+
  config MMU
-    def_bool y
+    bool "MMU"
      select HAS_PMAP
      select HAS_VMAP
+    help
+      Memory management unit is supported on most Arm based systems.

For this case, I would write "Select it you are plan to run Xen on Armv7-A or Armv8-A".
Ack.


+
+config MPU
+    bool "MPU"

I think it should be gated by UNSUPPORTED. SUPPORT.md also needs to be updated.
Ack.

+    help
+      Memory protection unit is supported on some Cortex-R systems.

Why do you make this specific to Cortex-R? Shouldn't this instead be Armv8-R?

Yes, you are correct. It should be Armv8-R. Otherwise, someone might think it is applicable for Cortex-R5, R7, etc.

- Ayan




 


Rackspace

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