[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 52/52] xen/arm: add Kconfig option CONFIG_HAS_MPU to enable MPU system support
- To: Penny Zheng <Penny.Zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Wed, 5 Jul 2023 18:20:33 +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=arcselector9901; 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=JKgoBxJu6agzDjVMWOWJwdJ1oYzgFy9V/XL4tulXSys=; b=ffTPtwUemzn9OAAZfI3CAJr5teNn3iFbUnpKC8Cz+ESMT0v50Ex5C7pTcya3rAWwl2W7+/+qv7eczV6vohM6ngILRkhl/iSTQeaxgzedydrZgeCKzs5yt8V0iaGX8QHqb/KyDJIWXd/v+vGIgY2/QifbmpRIiZukAzYtlPD676Gb0fTY2/gBDv/pcA+wwoQPyK/NVKgdNLx+hbb/+Npy3yeKN72DbkiOws4IYEBKB391VcnVpwvQT3E+KFZqtGWxHTdcBgM5dVZHzGvdhE0yWjM2w31CEoSTPafQ+D4XQ4kNtTon+iauS4xDOHxpEB0Ux5P12us5FE54WEmMSzvZvQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4mfbyeNN2cuVaaWgGOJ2rSlvgDVAL5rfzwy7CkZUFaw/NGYj1rwK50+aaYhVCOBdr4BY3Zup5WEpSxy/oZWXS58VWGDTkAXFo82DIw/Ru4Cm0uqjqFE135Op5v8xMXRSQZtET36Lui2e0875wT6bcM6DvUCcso+a3fGgm1WIW/TkNv2vAxGNfiSP+oVYR/5LKyd6JtuL5tj7tkAHclkBdmU5TpTg1wF2XcArcMMzRayAHKG9dP7JyVHj3Ix1RLvzHGFjHxi5DYSvo0KqcLngrPiNTViFC+WX/OH4y2Fw5lmbj2d3mT/IbDl1MObobe2Fzw8ieENrh/QCMl1diLK3A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <wei.chen@xxxxxxx>
- Delivery-date: Wed, 05 Jul 2023 17:21:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 26/06/2023 04:34, Penny Zheng wrote:
CAUTION: This message has originated from an External Source. Please use proper
judgment and caution when opening attachments, clicking links, or responding to
this email.
Introduce a Kconfig option CONFIG_HAS_MPU to enable MPU architecture
support. STATIC_MEMORY, ARCH_MAP_DOMAIN_PAGE and ARM_SECURE_STATE will
be selected by MPU system by default. Also, features like, ARM_EFI, are
not supported right now.
Current MPU system design is only for ARM 64-bit platform.
Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
v3:
- select ARCH_MAP_DOMAIN_PAGE and ARM_SECURE_STATE
- remove platform-specific config: CONFIG_ARM_V8R
---
xen/arch/arm/Kconfig | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 3f67aacbbf..2acdf39ec8 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -62,6 +62,7 @@ source "arch/Kconfig"
config HAS_MMU
bool "Memory Management Unit support in a VMSA system"
default y
+ depends on !HAS_MPU
select HAS_PAGING_MEMPOOL
select HAS_PMAP
select HAS_VMAP
@@ -70,6 +71,17 @@ config HAS_MMU
a memory system through a set of virtual to physical address
mappings and associated memory
properties held in memory-mapped tables known as translation tables.
+config HAS_MPU
+ bool "Memory Protection Unit support in a PMSA system"
+ default n
+ depends on ARM_64
This will not be true as R52 will support MPU
+ select ARCH_MAP_DOMAIN_PAGE
+ select ARM_SECURE_STATE
Also, R52 does not support secure state.
+ select STATIC_MEMORY
+ help
+ The PMSA is based on a Memory Protection Unit (MPU), which provides a
much simpler
+ memory protection scheme than the MMU based VMSA.
+
Instead, I will suggest something like this :-
config ARM_V8R
bool "ARMv8-R AArch64 architecture support (UNSUPPORTED)" if
UNSUPPORTED
default n
select HAS_MPU
select ARM_SECURE_STATE
select STATIC_MEMORY
depends on ARM_64
help
This option enables Armv8-R profile for Arm64. Enabling this option
results in selecting MPU.
So, that later on we can add :-
config AARCH32_V8R
bool "AArch32 Arm V8R Support (UNSUPPORTED)" if UNSUPPORTED
default n
select HAS_MPU
select STATIC_MEMORY
depends on ARM_32
help
This option enables Armv8-R profile for Arm32.
- Ayan
config HAS_FIXMAP
bool "Provide special-purpose 4K mapping slots in a VMSA"
depends on HAS_MMU
@@ -85,7 +97,7 @@ config ACPI
config ARM_EFI
bool "UEFI boot service support"
- depends on ARM_64
+ depends on ARM_64 && !HAS_MPU
default y
help
This option provides support for boot services through
--
2.25.1
|