From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: xen kernel: build failure Date: Wed, 23 Nov 2011 17:13:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jean Guyader Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 23/11/2011 16:31, "Jean Guyader" wrote: >>> 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. >> > > Is there a reason for that? What would be the recommended to add something > into the struct domain now if we can't make it bigger than a page. If the thing being added is sufficiently large and self-contained, it could be allocated separately and a pointer added to the domain struct. Else a large logical piece of the domain struct needs to be split off. Would have to check what would be a nice large piece -- arch.{hvm,pv} for example. Jan might also have an opinion, as he already did some work on shrinking the domain struct. -- Keir