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