>>> On 14.09.17 at 14:58, <wei.l...@citrix.com> wrote: > @@ -32,6 +33,14 @@ > #undef page_to_mfn > #define page_to_mfn(pg) _mfn(__page_to_mfn(pg)) > > +#ifndef NDEBUG > +static unsigned int __read_mostly root_pgt_pv_xen_slots > + = ROOT_PAGETABLE_PV_XEN_SLOTS; > +static l4_pgentry_t __read_mostly split_l4e; > +#else > +#define root_pgt_pv_xen_slots ROOT_PAGETABLE_PV_XEN_SLOTS > +#endif > + > /* > * Get a mapping of a PV guest's l1e for this linear address. The return > * pointer should be unmapped using unmap_domain_page(). > @@ -133,6 +142,79 @@ bool pv_map_ldt_shadow_page(unsigned int offset) > return true; > } > > +/* > + * This function must write all ROOT_PAGETABLE_PV_XEN_SLOTS, to clobber any > + * values a guest may have left there from alloc_l4_table(). > + */ > +void init_guest_l4_table(l4_pgentry_t l4tab[], const struct domain *d, > + bool zap_ro_mpt) > +{
Please move the static variables down right before this function, so that what belongs together stays together. With that Acked-by: Jan Beulich <jbeul...@suse.com> Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel