xen: Delay remapping memory of pv-domain
[cascardo/linux.git] / arch / x86 / xen / mmu.c
index f62af76..601914d 100644 (file)
@@ -1217,10 +1217,19 @@ static void __init xen_pagetable_p2m_copy(void)
 static void __init xen_pagetable_init(void)
 {
        paging_init();
-       xen_setup_shared_info();
 #ifdef CONFIG_X86_64
        xen_pagetable_p2m_copy();
+#else
+       xen_revector_p2m_tree();
 #endif
+       /* Allocate and initialize top and mid mfn levels for p2m structure */
+       xen_build_mfn_list_list();
+
+       /* Remap memory freed due to conflicts with E820 map */
+       if (!xen_feature(XENFEAT_auto_translated_physmap))
+               xen_remap_memory();
+
+       xen_setup_shared_info();
        xen_post_allocator_init();
 }
 static void xen_write_cr2(unsigned long cr2)