|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 03/15] x86/setup: break out E820_RAM accumulation
On Mon, Oct 12, 2026 at 10:20:16AM +0200, Jan Beulich wrote:
> We already have two instances of this, and we're about to gain a third.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
>
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1007,6 +1007,17 @@ static unsigned int __init copy_bios_e82
> return n;
> }
>
> +static unsigned long __init nr_ram_pages(void)
> +{
> + unsigned long nr_pages = 0;
> +
> + for ( unsigned int i = 0; i < e820.nr_map; i++ )
> + if ( e820.map[i].type == E820_RAM )
> + nr_pages += e820.map[i].size >> PAGE_SHIFT;
Do we want/need to ensure size is page-aligned here? AFAICT this is
the sanitized memory map, so it should have all regions aligned to
page boundaries.
Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |