]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
x86/pv: properly map and unmap page table in dom0_construct_pv
authorWei Liu <wei.liu2@citrix.com>
Tue, 5 Feb 2019 16:35:28 +0000 (16:35 +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/pv/dom0_build.c

index 293be076d9e011543e530fae3d70763d1f426a79..a07d2138a2fcb89c2e3bcf6cb822a1ce08e148b0 100644 (file)
@@ -690,6 +690,8 @@ int __init dom0_construct_pv(struct domain *d,
 
     if ( is_pv_32bit_domain(d) )
     {
+        l2_pgentry_t *l2t;
+
         /* Ensure the first four L3 entries are all populated. */
         for ( i = 0, l3tab = l3start; i < 4; ++i, ++l3tab )
         {
@@ -704,7 +706,9 @@ int __init dom0_construct_pv(struct domain *d,
                 l3e_get_page(*l3tab)->u.inuse.type_info |= PGT_pae_xen_l2;
         }
 
-        init_xen_pae_l2_slots(l3e_to_l2e(l3start[3]), d);
+        l2t = map_xen_pagetable_new(l3e_get_mfn(l3start[3]));
+        init_xen_pae_l2_slots(l2t, d);
+        UNMAP_XEN_PAGETABLE_NEW(l2t);
     }
 
     /* Pages that are part of page tables must be read only. */