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

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM



>>> On 26.08.18 at 14:19, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/mm/Makefile
> +++ b/xen/arch/x86/mm/Makefile
> @@ -1,9 +1,10 @@
>  subdir-y += shadow
> -subdir-y += hap
> +subdir-$(CONFIG_HVM) += hap
>  
>  obj-y += paging.o
> -obj-y += p2m.o p2m-pt.o p2m-ept.o p2m-pod.o
> -obj-y += altp2m.o
> +obj-y += p2m.o p2m-pt.o
> +obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o
> +obj-$(CONFIG_HVM) += altp2m.o
>  obj-y += guest_walk_2.o
>  obj-y += guest_walk_3.o
>  obj-y += guest_walk_4.o

Would you mind once again sorting things at the same time?

> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -535,7 +535,7 @@ struct page_info *p2m_get_page_from_gfn(
>  int p2m_set_entry(struct p2m_domain *p2m, gfn_t gfn, mfn_t mfn,
>                    unsigned int page_order, p2m_type_t p2mt, p2m_access_t 
> p2ma)
>  {
> -    struct domain *d = p2m->domain;
> +    struct domain * __maybe_unused d = p2m->domain;

Instead of this, why don't you simply latch hap_enabled()'s return
value into a local bool variable? (Otherwise I would ask for const
to be added here as you touch this anyway.) Adding
__maybe_unused should really be a last resort only.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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