WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] new domain builder breaks compatibility

To: Gerd Hoffmann <kraxel@xxxxxxx>
Subject: Re: [Xen-devel] new domain builder breaks compatibility
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Thu, 1 Feb 2007 16:22:59 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 01 Feb 2007 08:20:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45C20404.6040109@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070131214843.GB15106@xxxxxxxxxxxxxxxxxxxxxxx> <45C1AD2B.7070002@xxxxxxx> <20070201145517.GA26562@xxxxxxxxxxxxxxxxxxxxxxx> <45C20404.6040109@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel