From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] x86/bigmem: eliminate struct domain address width restriction Date: Tue, 1 Sep 2015 11:57:40 +0100 Message-ID: <1441105060.27618.37.camel@citrix.com> References: <55DD89B1020000780009D0EB@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZWjG4-0007Et-AU for xen-devel@lists.xenproject.org; Tue, 01 Sep 2015 10:57:44 +0000 In-Reply-To: <55DD89B1020000780009D0EB@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Andrew Cooper , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wed, 2015-08-26 at 01:41 -0600, Jan Beulich wrote: > @@ -225,10 +226,12 @@ static unsigned int __init noinline _dom > > return bits; > } > +#endif > > struct domain *alloc_domain_struct(void) > { > struct domain *d; > +#ifndef CONFIG_BIGMEM > /* > * We pack the PDX of the domain structure into a 32-bit field > within > * the page_info structure. Hence the MEMF_bits() restriction. > @@ -237,12 +240,16 @@ struct domain *alloc_domain_struct(void) > > if ( unlikely(!bits) ) > bits = _domain_struct_bits(); > +#else > +# define bits 0 const unsigned int bits = 0; Seems nicer than the trailing #undef? > +#endif > > BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); > d = alloc_xenheap_pages(0, MEMF_bits(bits)); > if ( d != NULL ) > clear_page(d); > return d; > +#undef bits > } > > void free_domain_struct(struct domain *d) > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel