From: Konrad Rzeszutek Wilk Subject: [PATCH] Include in balloon page tracking only PFNs which are marked as RAM in E820. Date: Wed, 19 Aug 2009 15:12:29 -0400 Message-ID: <1250709149-4730-2-git-send-email-konrad.wilk@oracle.com> References: <1250709149-4730-1-git-send-email-konrad.wilk@oracle.com> Return-path: In-Reply-To: <1250709149-4730-1-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org From: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/balloon.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 168e61f..ef2edd8 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -416,8 +416,12 @@ static int __init balloon_init(void) /* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { - page = pfn_to_page(pfn); - balloon_append(page); + int is_ram = page_is_ram(pfn); + if (is_ram) { + page = pfn_to_page(pfn); + if (PageReserved(page)) + balloon_append(page); + } } target_watch.callback = watch_target; -- 1.6.2.5