[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 14/23] x86/mm: move PV l4 table setup code



>>> On 14.09.17 at 14:58, <wei.liu2@xxxxxxxxxx> 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 <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.