]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
[LINUX][X86/64] Initialise pages outside initial allocation so that
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 9 Jun 2006 15:20:36 +0000 (16:20 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 9 Jun 2006 15:20:36 +0000 (16:20 +0100)
they are picked up by the balloon driver.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   10310:4df81d20a9a1a8dfbe47d1b5697122559d7b6cc9
xen-unstable date:        Fri Jun  9 16:18:40 2006 +0100

linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c

index f1ff11ecfc1e20b779ad04f34b8feab16bb02140..930c34a30315527655428fee60c18f828c5cd8d8 100644 (file)
@@ -876,6 +876,7 @@ static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
 void __init mem_init(void)
 {
        long codesize, reservedpages, datasize, initsize;
+       unsigned long pfn;
 
        contiguous_bitmap = alloc_bootmem_low_pages(
                (end_pfn + 2*BITS_PER_LONG) >> 3);
@@ -904,6 +905,12 @@ void __init mem_init(void)
 #else
        totalram_pages = free_all_bootmem();
 #endif
+       /* XEN: init and count pages outside initial allocation. */
+       for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
+               ClearPageReserved(&mem_map[pfn]);
+               set_page_count(&mem_map[pfn], 1);
+               totalram_pages++;
+       }
        reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn);
 
        after_bootmem = 1;