Hi Luca,

On 12/03/2024 14:03, Luca Fancellu wrote:
> 
> 
> Introduce a new helper function in the static-memory module
> that can be called to manage static memory banks, this is
> done to reuse the code when other modules would like to
> manage static memory banks that are not part of the
> reserved_mem structure.
The placement of this patch in a series is a bit strange given no use of 
init_staticmem_bank()
in the subsequent patch. I would move it right before patch #8.

Also, you could mention that this is because the information about shared 
memory regions
will no longer be stored in reserved_mem.

> 
> Signed-off-by: Luca Fancellu <luca.fance...@arm.com>
> ---
>  xen/arch/arm/include/asm/static-memory.h | 12 ++++++++++++
>  xen/arch/arm/static-memory.c             | 12 +-----------
>  2 files changed, 13 insertions(+), 11 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/static-memory.h 
> b/xen/arch/arm/include/asm/static-memory.h
> index 3e3efd70c38d..665d4df50eda 100644
> --- a/xen/arch/arm/include/asm/static-memory.h
> +++ b/xen/arch/arm/include/asm/static-memory.h
> @@ -7,6 +7,18 @@
> 
>  #ifdef CONFIG_STATIC_MEMORY
> 
> +static inline void init_staticmem_bank(const struct membank *bank)
> +{
> +    mfn_t bank_start = _mfn(PFN_UP(bank->start));
The header should be self-contained so you should add <xen/pfn.h> that is not 
included in asm/kernel.h path.

Other than that:
Reviewed-by: Michal Orzel <michal.or...@amd.com>

~Michal

Reply via email to