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

[Xen-devel] Re: xen: do not create the extra e820 region at an addr lowe

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: xen: do not create the extra e820 region at an addr lower than 4G
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 7 Apr 2011 11:14:45 +0100
Cc: Konrad, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Wilk <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 07 Apr 2011 03:15:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1302163722.27835.17.camel@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1302163722.27835.17.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Thu, 7 Apr 2011, Ian Campbell wrote:
> I can't find this patch on any mailing list to respond to so starting a
> new thread. In case I've not missed it but instead it really wasn't
> posted -- in the future can we try and ensure that any patches have been
> posted at least once. Same for the pull request, it should go to a list.

This patch hasn't been sent anywhere yet because it is part of a series
that is not ready yet.


> BTW the version in Konrad's tree is Stefano's 2.6.39-rc1-fixes branch
> but Stefano's tree only has 2.6.39-rc2-fixes now -- is that important?

I rebased 2.6.39-rc1-fixes on 2.6.39-rc2, dropped 2.6.39-rc1-fixes, and
still doing some refactoring (and force-pushing) until the series is
ready to be sent upstream.


> Anyway, the patch itself:
> 
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index 9c38bd1..f831568 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -229,7 +229,7 @@ char * __init xen_memory_setup(void)
>  
>         memcpy(map_raw, map, sizeof(map));
>         e820.nr_map = 0;
> -       xen_extra_mem_start = mem_end;
> +       xen_extra_mem_start = mem_end < (1UL<<32) ? (1UL<<32) : mem_end;
>         for (i = 0; i < memmap.nr_entries; i++) {
>                 unsigned long long end;
> 
> "(1UL<<32)" will overflow on a 32 bit kernel.
> 
> Oh hang on... that's the difference between the -rc1 and -rc2 versions
> of Stefano's branches:
> 
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index f831568..ee44c56 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -229,7 +229,7 @@ char * __init xen_memory_setup(void)
>  
>         memcpy(map_raw, map, sizeof(map));
>         e820.nr_map = 0;
> -       xen_extra_mem_start = mem_end < (1UL<<32) ? (1UL<<32) : mem_end;
> +       xen_extra_mem_start = max((1ULL <<32), mem_end);
>         for (i = 0; i < memmap.nr_entries; i++) {
>                 unsigned long long end;
> 
> So I guess it was important!
> 
> (also the whitespace in "(1ULL <<32)" is a bit funky, checkpatch whinges
> too)
 
thanks, I'll fix

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