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

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


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 19 Sep 2024 12:52:17 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=b32//qwQ70c5v3kMPJuxHwMrpfzQ8QD7lNYNaIvqG4E=; b=eQp5dDZltpEO0ZLYsqNxS1Jl/IT2O79PAts11hZw4zq89CRxvfKO8JSkeklasUYUM7WOBHYjuVXtN4N+3Tu0JnlFIECt0BgoqTs//Wa0mo4VvnxpOpEqlwKanNVj9WlClgNo/fOntv6RAg3nHLqdgBb26epTmz+c+YBu2OxJnmKm6/ZY0a/DdsS/N6nKHvNcyuu87YLZjLwf4hseohYHQ4woAYYrsg08B/oFIXbQ+4KtzP2sHYpbcEDSjHGzbbeQ95IVILn7PL8dHQXuGoOxxx20v/nUZfAGtJhHPZOYc2Rsmd13EmOkuHcNKz4aXLmIEoDYoWNI49KLtDVLxnf8vw==
  • 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=b32//qwQ70c5v3kMPJuxHwMrpfzQ8QD7lNYNaIvqG4E=; b=ZTil1pyQYz4NBvUUK+CxG7MHXLUaj+Kb8OeW/CZe1k+k4J8VdiHwNuAVO8XHiQr+f4hG20X5JcmfBi56gHLxrlxEwdY+Vka6t/KMSiQ+11mNWhbAXuIP/k6391NEWb3EB7iUloiKFM3lWMrqWHRVjhCOxVuwsr9T9t3w8HmisCya8JNJEUL5GcLpw+AqbQ+i9C5ULsdC/7CFVN9IDx0rrgrKt8GseHB8rvxsb4J6gQlSoYxBwlvXPBc3SZkr3kcUx5q6uncWfU6SjDJX7HKBqxfn53fZQJ3kA5+t24OhMQTzjYamI48jfiaeWCpAtXe+fFg5rQJ41IXMwUfsJeDCSw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=cXm77Pb0diokKKg9H6BGuuZTdTQ611WQEPik1VjP74ndpYZ0Fo1mp3Dt+Y4xtNsKjZZeMXQLI1YxTbDQyBGV3iJ3FGVvxFktA50rKXNz6T+6slPXNqoaFWSD5E9zR/6kFFC9SsA/i5UXxUxuaw0mc+fCGymrZIOfYRYmZJGbBrpKIOuHwn8JbRvPbc6/g+MoVWxaoY2zsOdYk0s/VjxmKp73rIvM0lH93ycBgwZdAECTL2/ce/FwzF4F/w1tAh1023ehvP+Qey54ZumvaLoFfJo1525e17IcSN0z/tCHHcQRphE1E6g4Py6leJb6g4nzFQy0+lR/i5ygFgwshmeo3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WiOUoKb0jeekFkFP4ClzEUxJ6jAvKpm3mdfpHpRJQQoGX+HJRhM/YHoYOXSBM3aCtwHqu2ovrXRaF5x5614VNnZKEUPotN0wm3d+F+05RT5SdlNQ47qDrm7beP7KakfpNDLOyg+Sjp9qduIer4ECk62bUvNc+iqgquHyZtWtPX40og0sX6d4yXrVKzbHYP7KiEHDefR6vVZxBcGkihsjZRu4I5vSDIVtjdVqLhAnehkVIjddMGZ0jYi0M4W9NLlhRvze0ujtKuQ7LHCHQDrpVIYv1dBe+TfTEWE7sVTGPAdxvMIO44ArUDjuF9u+ClxB7P6+eoR47+kopWbjKV/bRw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 19 Sep 2024 12:53:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbCfNyDmiIxIguw0SW7joLZtbx7LJfDHaAgAAFGoA=
  • Thread-topic: [PATCH v2 1/4] xen/arm: mpu: Introduce choice between MMU and MPU

Hi,

> On 19 Sep 2024, at 14:33, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Ayan,
> 
> On 18/09/2024 19:50, 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.
>> 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).
> 
> I am a bit confused with this statement. Does this mean that not all Armv8-R 
> supports MPU? Or are you trying to say that not all of them support EL2?
> 
> If the former, we probably want to check pretty early during boot that the an 
> MPU is present *and* we have enough regions.

On Armv8-R if there is EL2 then there is an MPU at EL2.
Only EL1 might have an MMU with the MPU (but i do not think it can have only an 
MMU).

Cheers
Bertrand

> 
>> +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.
> 
> Cheers,
> 
> -- 
> Julien Grall





 


Rackspace

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