]> xenbits.xensource.com Git - people/hx242/xen.git/commitdiff
x86_64/mm: drop l4e_to_l3e invocation from paging_init
authorWei Liu <wei.liu2@citrix.com>
Thu, 31 Jan 2019 18:31:04 +0000 (18:31 +0000)
committerHongyan Xia <hongyax@amazon.com>
Wed, 2 Oct 2019 16:16:30 +0000 (17:16 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/x86_64/mm.c

index b51d34e6c5fa4803a96717cf3f615abc47c8a511..460dbed0a848f962d38a0045804cbe4edfb691a4 100644 (file)
@@ -649,8 +649,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) )
@@ -702,6 +704,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;