]> xenbits.xensource.com Git - people/hx242/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)
committerHongyan Xia <hongyax@amazon.com>
Wed, 16 Oct 2019 12:25:06 +0000 (13:25 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/smpboot.c

index f2e60abd62810ac14e9f9827d9d91e7fbde97580..cda650da1f0562dec5ddd89afef1c1b15e5a3570 100644 (file)
@@ -932,11 +932,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);
     }
 }