|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 01/13] xen/arm: re-arrange the static shared memory region
Hi Penny, On 09/01/2023 07:48, Penny Zheng wrote: -----Original Message----- From: Julien Grall <julien@xxxxxxx> Sent: Sunday, January 8, 2023 7:44 PM To: Penny Zheng <Penny.Zheng@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx Cc: Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> Subject: Re: [PATCH v1 01/13] xen/arm: re-arrange the static shared memory region On 15/11/2022 02:52, Penny Zheng wrote:This commit re-arranges the static shared memory regions into a separate array shm_meminfo. And static shared memory region nowwouldhave its own structure 'shm_membank' to hold all shm-related members, like shm_id, etc, and a pointer to the normal memory bank 'membank'. This will avoid continuing to grow 'membank'. Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> --- xen/arch/arm/bootfdt.c | 40 +++++++++++++++++++------------ xen/arch/arm/domain_build.c | 35 ++++++++++++++++----------- xen/arch/arm/include/asm/kernel.h | 2 +- xen/arch/arm/include/asm/setup.h | 16 +++++++++---- 4 files changed, 59 insertions(+), 34 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 6014c0f852..ccf281cd37 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -384,6 +384,7 @@ static int __init process_shm_node(const void *fdt,int node, I wasn't talking about the field in "struct shm_membank". Instead, I was referring to the local variable: struct meminfo *mem = &bootinfo.reserved_mem;AFAICT, the only use after this patch is when you add a new bank in shm_mem. So you could restrict the scope of the local variable. If I removed instance in bootinfo.reserved_mem, a few more path needs to be updated, like Init_staticmem_pages, dt_unreserved_regions, etcThis will make easier to confirm that most of the use of 'mem' have been replaced with 'shm_mem' and reduce the risk of confusion between the two (the name are quite similar). [...]diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index bd30d3798c..c0fd13f6ed 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -757,20 +757,20 @@ static int __initacquire_nr_borrower_domain(struct domain *d, Just to clarify, with this patch you don't need to check the type. I was pointing out a latent error in the existing code.
Hmmm... I didn't suggest to introduce a local variable. I would still much prefer if we keep using 'kinfo' because we keep all the domain building information in one place. So ``struct meninfo`` should want to be defined in ``kinfo``. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |