From: John Levon Subject: Re: new domain builder breaks compatibility Date: Thu, 1 Feb 2007 16:22:59 +0000 Message-ID: <20070201162259.GA31065@totally.trollied.org.uk> References: <20070131214843.GB15106@totally.trollied.org.uk> <45C1AD2B.7070002@suse.de> <20070201145517.GA26562@totally.trollied.org.uk> <45C20404.6040109@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <45C20404.6040109@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Feb 01, 2007 at 04:15:16PM +0100, Gerd Hoffmann wrote: > > Does that ensure the 4Mb alignment too? > > Yes. Uhm, no, depends. It completely fills the topmost L1 pagetable > with entries, so you end up with an 4MB alignment for 32bit and 2MB > alignment for PAE and 64bit. I think the old builder had the same > behaviour, so the 4MB are actually a documentation bug ;) Hmm... am I misunderstanding this code: 816 /* v_end = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1); */ 817 v_end = vstack_end; 818 if ( !increment_ulong(&v_end, (1UL<<22)-1) ) 819 goto error_out; 820 v_end &= ~((1UL<<22)-1); 821 822 if ( (v_end - vstack_end) < (512UL << 10) ) 823 { 824 /* Add extra 4MB to get >= 512kB padding. */ 825 if ( !increment_ulong(&v_end, 1UL << 22) ) 826 goto error_out; 827 } Surely that guarantees we get at least 512Kb and it ends on a 4Mb boundary? regards john