From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: xen kernel: build failure Date: Tue, 25 Oct 2011 13:35:27 +0100 Message-ID: References: <4EA698C8.8030603@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4EA698C8.8030603@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 25/10/2011 12:08, "Christoph Egger" wrote: > > Hi, > > Compiling the xen kernel fails with: > > xen/arch/x86/domain.c: In function 'alloc_domain_struct' > xen/arch/x86/domain.c:191: error: negative width in bit-field '' Problem is that struct domain has grown bigger than a page for some reason, in your build environment. I can't reproduce this. > Removing the line > > BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); > > makes xen kernel compile again. But not actually work properly. We only allocate a single page for the domain struct. If the struct is bigger than a page, you'll get memory corruption at run time. -- Keir > > Christoph >