[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/4] xen: arm: make VMAP only support in MMU system
- To: Jan Beulich <jbeulich@xxxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Thu, 8 Aug 2024 16:50:08 +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=TyitCXqEbTERU7nFSSyE3+PH9eypHEnE3aJSa5KpLkM=; b=nZDktst9v3fvCdkHKj4K1rl13TFjQgK9r0b3OgsHcZ6MEYTn6hadjDh1eHINAtxJHtdJGs+0en+Keajxg/c0w0m0iYVa5u8ikeqFVwvuldwiui6SKS+Qhrn8x9HQV9gBQpmJBpzuSRm7cD7hwXXXcGRScn3CD9526wv11nWGUNN92KnszQGURGbIsPtSoqtze03SkqgwzyGX2htybZd1iE8vjeHroYBds7LIdzkIdmg4hgsXQq6ge3sPaM77b+yq8DA3HRIikgORAtbBAvzAYDGQFGOQXo1DaoXxrByBnhD7A6wPktf7meHA5mNVw2u9crP2cgq4dstIfrKm8v8wpQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xW0tTbA82r29sEfHTAIpURKkYWzd+YJCO6u8bxdhObWfIZ3P+3XeIh5VeoSHQ2bXLcDjJ4DLpRkf4JE/xXtkZ78mSoe0+xFTBR/5B2pAl8TCmFlxHQvA4W1xG8mZuUHjdFfwXejLcr85BrlW8Ceu4I6N0cCaS9RrQESAjXokGvziqulemXXKNN2uAebvzrtVO14nkrbNseui6FCboYSNdb80ywUTY/Ycd4M8Iln4XxeKElv1RW6BQn9MHedD4nyljjgqdCEZM0KzGwfEbaQO4YnMrHBEBYxySizU3qhoSgKGGe6cpsfPYLEPmqUymV4j59MbUIULG1JGMqqrtvUXbw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Penny Zheng <penny.zheng@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, sstabellini@xxxxxxxxxx, bertrand.marquis@xxxxxxx, michal.orzel@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, julien@xxxxxxx
- Delivery-date: Thu, 08 Aug 2024 15:50:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Jan,
On 08/08/2024 13:49, Jan Beulich wrote:
On 08.08.2024 14:09, Ayan Kumar Halder wrote:
@@ -58,9 +58,13 @@ config PADDR_BITS
default 40 if ARM_PA_BITS_40
default 48 if ARM_64
+config HAS_VMAP
+ def_bool y
With this being always enabled, ...
I had to define the config somewhere. It seemed this is the correct
place to define as HAS_VMAP will be turned off when MPU is introduced.
So, it will be
config HAS_VMAP
def_bool n
At that time, only MMU will select HAS_VMAP.
config MMU
def_bool y
select HAS_PMAP
+ select HAS_VMAP
.. what use is this?
--- a/xen/include/xen/vmap.h
+++ b/xen/include/xen/vmap.h
@@ -141,7 +141,9 @@ void *arch_vmap_virt_end(void);
/* Initialises the VMAP_DEFAULT virtual range */
static inline void vm_init(void)
{
+#ifdef CONFIG_MMU
vm_init_type(VMAP_DEFAULT, (void *)VMAP_VIRT_START, arch_vmap_virt_end());
+#endif
}
What about non-Arm, which all have MMUs but no corresponding Kconfig
setting?
AFAICS , the only file that is of our concern xen/common/vmap.c It is
enclosed with VMAP_VIRT_START which is defined in mmu specific file
(xen/arch/arm/include/asm/mmu/layout.h).
So, it will not be compiled for Arm MPU arch.
And why is this not CONFIG_HAS_VMAP anyway (with HAS_VMAP
properly moved to common/Kconfig, where e.g. HAS_PMAP also lives,
and then unconditionally selected by all other architectures)?
I am not sure why CONFIG_HAS_VMAP should be moved to common/Kconfig when
it will be selected/deselected only for Arm architecture.
- Ayan
Jan
|