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

Re: [PATCH v4 02/13] xen/arm: Introduce 'choice' for memory system architecture


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Thu, 10 Aug 2023 04:38:41 +0000
  • Accept-language: zh-CN, en-US
  • 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=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=yy62ScwNvi03uEzv2P7ASs/DqaoxRJuTMUvG7ja0Ffc=; b=jiE9kpz8BYHlwyk0jlkVj1Icj/TtI/PqqGatNKaznB/ToY9gxiSe6S+5tWcWef8gsghyty+dGboKW1rTDyHJhR7fWxhmzTKGf9xYbpd+7CzqNvr0hatIFUgSJKzKxtwG0sTZq/rvqYGP+3HLr57zVLYP7z/D4SOp5s333iOJe374pbU1qAN/IVk67/qwy3zvMk/Yt/QFGizQspFr9vB2qe7TCQTtkY6KKrQH6fgsq9HHUIXn7+m4sJRg5mz7hLeARuKB9nfULDfpR+PKvGFlow2kH92ruNfE6EbLs8BQ12sV9FGfDmskE4/LMfz1X5jJdTWlLuOlGJQ75YNFvGp/gg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbqQJ5JFVl12KcsWBzJiVUxh8bRlIKQ+rpHWTic8IocNU218qk8k8lE7h0HITE/G77WnKEmHBIBbzs+1dXKdI/bRgcnvZs4p2MlDNPERp7rFnG9y5GcULUTy7VK53UaEJA+1al/1WKfTWlw7NtEmyrechv/IW7CWQd+/TjKkdycZ75uJU3r2pVEoNkIxmHwdnsOoyzcxcZ7qbOjp+RBGlet8g7anCMC8Chd21blprMaqUzR9lGTbQ0w/tY/fW+oQJjv47Pyxs1Bq2uDRu852eM+nphqi7ZVtrAXR3r3Jyxtb3DN7oLlP8rrhIAjNyBYS+8lyjcK8Q+zfLzVY9mHe3A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Thu, 10 Aug 2023 04:39:18 +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: AQHZxCqJmtSfvrOVyE67LM5R2F23xa/h6xaAgAEVmgA=
  • Thread-topic: [PATCH v4 02/13] xen/arm: Introduce 'choice' for memory system architecture

Hi Julien,

> On Aug 9, 2023, at 20:04, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Henry,
> 
> On 01/08/2023 04:44, Henry Wang wrote:
>> There are two types of memory system architectures available for
>> Arm-based systems, namely the Virtual Memory System Architecture (VMSA)
>> and the Protected Memory System Architecture (PMSA). According to
>> ARM DDI 0487G.a, A VMSA provides a Memory Management Unit (MMU) that
>> controls address translation, access permissions, and memory attribute
>> determination and checking, for memory accesses made by the PE. And
>> refer to ARM DDI 0600A.c, the PMSA supports a unified memory protection
>> scheme where an Memory Protection Unit (MPU) manages instruction and
>> data access. Currently, Xen only suuports VMSA.
>> As a preparation of the Xen MPU (PMSA) support. Introduce a Kconfig
>> choice under the "Architecture Features" menu for user to choose the
>> memory system architecture for the system. Since currently only VMSA
>> is supported, only add the bool CONFIG_HAS_MMU to keep consistent with
>> the default behavior. User can choose either VMSA or PMSA but not both
>> in the future after PMSA/MPU is supported in Xen.
> 
> So in the long run I agree that we will want to have a choice. But this seems 
> to be a bit premature to introduce it now as the user can't select the MPU 
> and also can't deselect MMU.
> 
> Therefore, I think it would be best if we introduce an unselectable config 
> for now. Like:
> 
> HAS_MMU
>  def_bool y
> 
> This could be turned to a choice once you introduce the MPU.
> 
> Also, from my understanding, we are using the prefix HAS_ to indicate if an 
> architecture support the given feature. In your case, you will want the user 
> to select it, so I would just name the config MMU.

Make sense, I will just introduce a

MMU
  def_bool y

in this patch and turn this to a choice between CONFIG_MMU and CONFIG_MPU
in the last patch of the full MPU series where MPU is expected to be functional.

Kind regards,
Henry

> 
> Cheers,
> 
> -- 
> Julien Grall





 


Rackspace

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