[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
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |