summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-08-27 15:18:19 -0700
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-10-22 12:57:25 -0700
commit33a847502b0338351cebd8fc0c68ac796cfadbbd (patch)
tree58f1628db992d5b358042e5fac9eb2c5fd35bf5f /arch/x86/xen/enlighten.c
parentc3798062f100c3e1d4ae1241bc536f3b1f28a6ca (diff)
downloadlinux-33a847502b0338351cebd8fc0c68ac796cfadbbd.tar.gz
linux-33a847502b0338351cebd8fc0c68ac796cfadbbd.tar.bz2
linux-33a847502b0338351cebd8fc0c68ac796cfadbbd.zip
xen: defer building p2m mfn structures until kernel is mapped
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>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index ee304b52d8b7..d8873014b5ed 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -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 */