Skip to contentSkip to conversation

xen: fix the check of e_pfn in xen_find_pfn_range

PATCH Applied Konrad Rzeszutek Wilk 2 participants 2 messages Oct 27, 2015 – Nov 2, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: fix the check of e_pfn in xen_find_pfn_range

From: Zhenzhong Duan <[email protected]>

On some NUMA system, after dom0 up, we see below warning even if there are enough pfn ranges that 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.

---
 arch/x86/xen/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/setup.c +1 -1
index 387b60d..d1fac0e 100644
@@ -212,7 +212,7 @@ static unsigned long __init xen_find_pfn_range(unsigned long *min_pfn)
 		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);
Signature · 1 line
2.1.0
Applied
#1 lore raw
Quoted 7 lines · Konrad Rzeszutek Wilk

From: Zhenzhong Duan <[email protected]>

On some NUMA system, after dom0 up, we see below warning even if there are enough pfn ranges that 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.

Applied to for-linus-4.4, thanks.

David