[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 01/18] mini-os: correct first free pfn



Juergen Gross, on Fri 05 Aug 2016 19:35:45 +0200, wrote:
> The first free pfn available for allocation is calculated by adding the
> number of page table frames to the pfn of the first page table and
> then the magic number 3 to account for start info page et al.
> 
> As the start info page, xenstore page and console page are allocated
> _before_ the page tables leaving room for these pages behind the page
> tables makes no sense.

Ah, it seems this dates back a very long time ago indeed.

> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  arch/x86/mm.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/mm.c b/arch/x86/mm.c
> index 51aa966..ae1036e 100644
> --- a/arch/x86/mm.c
> +++ b/arch/x86/mm.c
> @@ -867,9 +867,8 @@ void arch_init_mm(unsigned long* start_pfn_p, unsigned 
> long* max_pfn_p)
>      printk("stack start: %p(VA)\n", stack);
>      printk("       _end: %p(VA)\n", &_end);
>  
> -    /* First page follows page table pages and 3 more pages (store page etc) 
> */
> -    start_pfn = PFN_UP(to_phys(start_info.pt_base)) + 
> -        start_info.nr_pt_frames + 3;
> +    /* First page follows page table pages. */
> +    start_pfn = PFN_UP(to_phys(start_info.pt_base)) + 
> start_info.nr_pt_frames;
>      max_pfn = start_info.nr_pages;
>  
>      /* We need room for demand mapping and heap, clip available memory */
> -- 
> 2.6.6
> 

-- 
Samuel
<c> hiri, le cri ici, c des marrants
<c> j'ai un rep ".uglyhackdirectorywithoutacls" ds mon home
 -+- #ens-mim en stage -+-

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.