[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: Mon, 12 Aug 2024 17:02:21 +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=1zv7eTujslg9st9wOJERPujE+KPIV4AvxSQ14+oEERM=; b=aMYrpeDV1FBGFi17ZBVCxAbFdS5aoahm1XUw7FVi9RM4NGbFHoCE6xanU4dmul3VgUAF7kx4jMPUC9uyItFvtooNiOeyc5l6wONQ+SsVx59926ewxfKr/4L5sUnYKARKtsOW5bzpVAZit0faXtJ1EC9tScRxYQAG7PYPeOaySmmzhjcVO+0q5pmSL9uc9BNh1mBLqiMeHIvtmzj7F2NgijEpTmFVsTKSi/U6hbH/lOb2JHRrqCsn0g/b+h1LPo1FWfiiuD0KvkSE+TZnRYhJlJJ4N+nq7w29M4m25qCQvUE4MHIsjXQc6rA72R1A/EZBpMn44TGVoriCnPC4pHQ7lA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NH4L/HhV5hcBOo4uUToN70VZgy0B+KeOASudh2WPbGvkAbCPdl1CVIDsdbRkzXXMdxfVLZW2q/1Qnw9BgQyEQ2R2brVxe2p9ir+DTcxhoZZxKIJ4k+dEnXx9htZ0kmbO6yIh/pkJyZxsyHOp5rWHk+ov+YNq7/E2E3gGIfuXMZnJ/4ZNUnEdGMDOw7xEPzlV1bNf9E6QK6qSdm5vxhgmUm6ZtJxE9udvjgB/QM5J7xA1r1eAagwJ5rqFufv+t6s2FH/YsC6EU6ZaAEPCB6P0j4TYJA734K1KRe9lvP9HJddPfXk4tfZyeb8r+fEdJWBaRwbxagdQ+Blba4brBfxBJQ==
  • 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: Mon, 12 Aug 2024 16:02:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 09/08/2024 10:34, Jan Beulich wrote:
On 08.08.2024 17:50, Ayan Kumar Halder wrote:
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.
Well, but why is it not simply

config HAS_VMAP
        bool

from the very beginning? (There should never be "def_bool n" imo, btw.)

--- 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.
Yet that wasn't my question. I asked about non-Arm, for all of which it
looks like you're changing behavior of vm_init() (by suddenly making it
do nothing).

Oh now I see what you mean. There is no CONFIG_MMU is x86 , yet it is used to enclose a common code which is a mistake.

So, we should introduce HAS_VMAP in xen/common/Kconfig and select it from X86, X86_64 and Arm.

Is my understanding correct ?

- Ayan





 


Rackspace

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