Skip to content

Commit

Permalink
xen: fix the check of e_pfn in xen_find_pfn_range
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
  • Loading branch information
Zhenzhong Duan authored and David Vrabel committed Nov 2, 2015
1 parent 914beb9 commit abed7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit abed7d0

Please sign in to comment.