|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 10/52] xen/arm: Move MMU related definitions from config.h to mmu/layout.h
Hi Penny, On 05/07/2023 07:51, Penny Zheng wrote: On 2023/7/5 05:54, Julien Grall wrote:Hi Penny, On 26/06/2023 04:34, Penny Zheng wrote:From: Wei Chen <wei.chen@xxxxxxx> Xen defines some global configuration macros for Arm in config.h. We still want to use it for MMU systems, but there are some addressDid you mean MPU?yes, typolayout related definitions that are defined for MMU systems only. These definitions could not be used by MPU systems, but adding ifdefery with CONFIG_HAS_MPU to gate these definitions will result in a messy and hard-to-read/maintain code. So we keep some common definitions still in config.h, but move MMU related definitions to a new file - mmu/layout.h to avoid spreading "#ifdef" everywhere.Just to ease the review, can you add some details which one are considered common?Sure, IMO, the only part left in common is as follows: ``` #ifdef CONFIG_ARM_64 #define FRAMETABLE_SIZE GB(32) #define FRAMETABLE_NR (FRAMETABLE_SIZE / sizeof(*frame_table)) #endif ``` Hmmm... Looking at the result of the patch, you moved FRAMETABLE_SIZE and FRAMETABLE_NR in layout.h. Also, I can't find any layout specific define in config.h. So I think the paragraph could be dropped. The main problem is that, at least on Arm, the PDX is initialized before you can allocate any memory. You should be able to re-order the code so we populate the boot allocator first. But I don't think this is worth it right now as, if I am not mistaken, the pdx_group_valid is only 256 bytes on Arm64. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |