From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754464AbbIBKus (ORCPT ); Wed, 2 Sep 2015 06:50:48 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:32831 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754443AbbIBKuq (ORCPT ); Wed, 2 Sep 2015 06:50:46 -0400 Reply-To: zhenzhong.duan@oracle.com To: LKML Cc: jgross@suse.com, david.vrabel@citrix.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com From: Zhenzhong Duan Subject: [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range Organization: Oracle Message-ID: <55E6D4B8.6020402@oracle.com> Date: Wed, 2 Sep 2015 18:51:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some numa system, after dom0 up, we see below warning even if there are enough pfn ranges could be used for remapping. "Unable to find available pfn range, not remapping identity pages" Fix it to avoid getting a memory region of zero size in xen_find_pfn_range. Signed-off-by: Zhenzhong Duan --- arch/x86/xen/setup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index a3a7546..c11f6b2 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -178,7 +178,7 @@ static unsigned long __init xen_find_pfn_range( e_pfn = PFN_DOWN(entry->addr + entry->size); /* We only care about E820 after this */ - if (e_pfn < *min_pfn) + if (e_pfn <= *min_pfn) continue; s_pfn = PFN_UP(entry->addr); -- 1.7.3