]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86/dom0: Use init_xen_pae_l2_slots() rather than opencoding it
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 8 Nov 2018 14:17:46 +0000 (14:17 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Nov 2018 11:57:11 +0000 (11:57 +0000)
No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/pv/dom0_build.c

index 21d262b62bfb88488f726f246a0e4dc263a2e390..812b0262cb9431d978c4b86e9acc78dee7ff4509 100644 (file)
@@ -684,11 +684,8 @@ int __init dom0_construct_pv(struct domain *d,
             if ( i == 3 )
                 l3e_get_page(*l3tab)->u.inuse.type_info |= PGT_pae_xen_l2;
         }
-        /* Install read-only guest visible MPT mapping. */
-        l2tab = l3e_to_l2e(l3start[3]);
-        memcpy(&l2tab[COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(d)],
-               &compat_idle_pg_table_l2[l2_table_offset(HIRO_COMPAT_MPT_VIRT_START)],
-               COMPAT_L2_PAGETABLE_XEN_SLOTS(d) * sizeof(*l2tab));
+
+        init_xen_pae_l2_slots(l3e_to_l2e(l3start[3]), d);
     }
 
     /* Pages that are part of page tables must be read only. */