Hi Michal, > On 11 Dec 2024, at 11:59, Michal Orzel <michal.or...@amd.com> wrote: > > > > On 11/12/2024 12:11, Luca Fancellu wrote: >> >> >> From: Penny Zheng <penny.zh...@arm.com> >> >> If the Xen heap is statically configured in Device Tree, its size is >> definite, so only the defined memory shall be given to the boot >> allocator. Have a check where init_domheap_pages() is called >> which takes into account if static heap feature is used. >> >> Extract static_heap flag from init data bootinfo, as it will be needed >> after destroying the init data section, rename it to using_static_heap >> and use it to tell whether the Xen static heap feature is enabled. >> >> Signed-off-by: Penny Zheng <penny.zh...@arm.com> >> Signed-off-by: Wei Chen <wei.c...@arm.com> >> Signed-off-by: Luca Fancellu <luca.fance...@arm.com> >> Reviewed-by: Jan Beulich <jbeul...@suse.com> # common > > [...] > >> +#ifdef CONFIG_STATIC_MEMORY >> +extern bool using_static_heap; >> +#else >> +#define using_static_heap false >> +#endif > Why? > > Static heap feature is not protected by CONFIG_STATIC_MEMORY today, so you > would introduce a silent regression > (i.e. without config enabled, property would be ignored and there would be no > static heap with no error message). > > ~Michal >
Thanks for pointing that out, I based my assumption on trusting the functional changes form the original patch, now that you point out that, seems also to me that the static heap feature is not dependent on the static memory, it can work with or without it. I’ll do the changes in order to address that. Cheers, Luca