xen: Delay remapping memory of pv-domain
[cascardo/linux.git] / arch / x86 / xen / mmu.c
index a8a1a3d..601914d 100644 (file)
@@ -1219,10 +1219,16 @@ static void __init xen_pagetable_init(void)
        paging_init();
 #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();
 }