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

Re: [Xen-devel] [PATCH v2] x86/bigmem: eliminate struct domain address width restriction



>>> On 22.09.15 at 14:51, <JBeulich@xxxxxxxx> wrote:
> PDX-es are 64 bits wide in that case, and hence no limit needs to be
> enforced.
> 
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Wei - another one I should have Cc-ed you on. Relevant to 4.6 as
that bigmem thing is new.

Jan

> ---
> v2: Use "const unsigned int bits = 0" instead of #define / #undef
>     (as suggested by IanC).
> 
> --- unstable.orig/xen/arch/x86/domain.c       2015-09-22 12:54:38.000000000 
> +0200
> +++ unstable/xen/arch/x86/domain.c    2015-08-26 09:24:28.000000000 +0200
> @@ -204,6 +204,7 @@ smap_check_policy_t smap_policy_change(s
>      return old_policy;
>  }
>  
> +#ifndef CONFIG_BIGMEM
>  /*
>   * The hole may be at or above the 44-bit boundary, so we need to determine
>   * the total bit count until reaching 32 significant (not squashed out) 
> bits
> @@ -225,10 +226,14 @@ static unsigned int __init noinline _dom
>  
>      return bits;
>  }
> +#endif
>  
>  struct domain *alloc_domain_struct(void)
>  {
>      struct domain *d;
> +#ifdef CONFIG_BIGMEM
> +    const unsigned int bits = 0;
> +#else
>      /*
>       * We pack the PDX of the domain structure into a 32-bit field within
>       * the page_info structure. Hence the MEMF_bits() restriction.
> @@ -237,6 +242,7 @@ struct domain *alloc_domain_struct(void)
>  
>      if ( unlikely(!bits) )
>           bits = _domain_struct_bits();
> +#endif
>  
>      BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
>      d = alloc_xenheap_pages(0, MEMF_bits(bits));




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


 


Rackspace

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