Skip to content

Commit

Permalink
xen: defer building p2m mfn structures until kernel is mapped
Browse files Browse the repository at this point in the history
When building mfn parts of p2m structure, we rely on being able to
use mfn_to_virt, which in turn requires kernel to be mapped into
the linear area (which is distinct from the kernel image mapping
on 64-bit).  Defer calling xen_build_mfn_list_list() until after
xen_setup_kernel_pagetable();

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Oct 22, 2010
1 parent c379806 commit 33a8475
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,9 @@ asmlinkage void __init xen_start_kernel(void)
xen_raw_console_write("mapping kernel into physical memory\n");
pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages);

/* Allocate and initialize top and mid mfn levels for p2m structure */
xen_build_mfn_list_list();

init_mm.pgd = pgd;

/* keep using Xen gdt for now; no urgent need to change it */
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,6 @@ void __init xen_build_dynamic_phys_to_machine(void)

p2m_top[topidx][mididx] = &mfn_list[pfn];
}

/* Allocate and initialize top and mid mfn levels */
xen_build_mfn_list_list();
}

unsigned long get_phys_to_machine(unsigned long pfn)
Expand Down

0 comments on commit 33a8475

Please sign in to comment.