]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
x86/smpboot: remove lXe_to_lYe in cleanup_cpu_root_pgt
authorWei Liu <wei.liu2@citrix.com>
Tue, 5 Feb 2019 13:51:12 +0000 (13:51 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 12 Feb 2019 11:03:20 +0000 (11:03 +0000)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/smpboot.c

index 32dce00d10055650bfa3d1baf9e49f7c9c5e9e3a..3ac1924391ca1e3edee7705995c0f9fe0a52146d 100644 (file)
@@ -951,11 +951,17 @@ static void cleanup_cpu_root_pgt(unsigned int cpu)
     /* Also zap the stub mapping for this CPU. */
     if ( stub_linear )
     {
-        l3_pgentry_t *l3t = l4e_to_l3e(common_pgt);
-        l2_pgentry_t *l2t = l3e_to_l2e(l3t[l3_table_offset(stub_linear)]);
-        l1_pgentry_t *l1t = l2e_to_l1e(l2t[l2_table_offset(stub_linear)]);
+        l3_pgentry_t *l3t = map_xen_pagetable_new(l4e_get_mfn(common_pgt));
+        l2_pgentry_t *l2t = map_xen_pagetable_new(
+            l3e_get_mfn(l3t[l3_table_offset(stub_linear)]));
+        l1_pgentry_t *l1t = map_xen_pagetable_new(
+            l2e_get_mfn(l2t[l2_table_offset(stub_linear)]));
 
         l1t[l1_table_offset(stub_linear)] = l1e_empty();
+
+        UNMAP_XEN_PAGETABLE_NEW(l1t);
+        UNMAP_XEN_PAGETABLE_NEW(l2t);
+        UNMAP_XEN_PAGETABLE_NEW(l3t);
     }
 }