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/
Home Products Support Community News


[Xen-devel] Re: [PATCH] e820: fix clip_to_limit()

To: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] e820: fix clip_to_limit()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 10 Nov 2009 08:39:39 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Xiao Guangrong <ericxiao.gr@xxxxxxxxx>
Delivery-date: Tue, 10 Nov 2009 00:40:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AF92217.7060207@xxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acph3sFqA9mf2Ch5SpidkZgtewhaNQAApWqc
Thread-topic: [PATCH] e820: fix clip_to_limit()
User-agent: Microsoft-Entourage/
On 10/11/2009 08:19, "Xiao Guangrong" <xiaoguangrong@xxxxxxxxxxxxxx> wrote:

>> Firstly, your 'break' was not inside that if-else block; it was right at the
>> end of the for loop. Secondly, just because we found one RAM region entirely
>> beyond the end of the clip boundary, does not mean there isn't another. We
>> can't just bail -- we have to iterate all the way to the end of the e820
>> map.
> I think that sanitize_e820_map() can sort e820 items from low address
> to high address, so, if we meet one e820 item beyond the end of the clip
> boundary, subsequent items also beyond it.
> Maybe I misunderstand sanitize_e820_map()? I'll reread it :-)

No, you understand it. And if we meet one e820 item beyond the end of the
clip boundary, all subsequent items are also beyond it. But that doesn't
mean we shouldn't handle them -- in fact we must handle them, as one of them
could be E820_RAM. Right?

 -- Keir

Xen-devel mailing list