]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xxx paging_init
authorWei Liu <wei.liu2@citrix.com>
Thu, 31 Jan 2019 18:31:04 +0000 (18:31 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 5 Feb 2019 14:32:53 +0000 (14:32 +0000)
xen/arch/x86/x86_64/mm.c

index 629b667b1d2ea36b3adfbe13fe7a77271f5c944b..82e5261e583419e2028376c1560b4ec6fc093d2e 100644 (file)
@@ -648,8 +648,10 @@ void __init paging_init(void)
     /* Create user-accessible L2 directory to map the MPT for compat guests. */
     BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) !=
                  l4_table_offset(HIRO_COMPAT_MPT_VIRT_START));
-    l3_ro_mpt = l4e_to_l3e(idle_pg_table[l4_table_offset(
-        HIRO_COMPAT_MPT_VIRT_START)]);
+
+    l3_ro_mpt_mfn = l4e_get_mfn(idle_pg_table[l4_table_offset(
+                                        HIRO_COMPAT_MPT_VIRT_START)]);
+    l3_ro_mpt = map_xen_pagetable_new(l3_ro_mpt_mfn);
 
     l2_ro_mpt_mfn = alloc_xen_pagetable_new();
     if ( mfn_eq(l2_ro_mpt_mfn, INVALID_MFN) )
@@ -701,6 +703,7 @@ void __init paging_init(void)
 #undef MFN
 
     unmap_xen_pagetable_new(l2_ro_mpt);
+    unmap_xen_pagetable_new(l3_ro_mpt);
 
     machine_to_phys_mapping_valid = 1;