[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/numa: fix c/s 20120 (Fix SRAT check for discontig memory)
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1251709817 -3600 # Node ID 27b3bd0a47fd8b020ce06567658237f3d25227f9 # Parent cf95641ba1d0a6a868f161a45a48f8aac9dd54d3 x86/numa: fix c/s 20120 (Fix SRAT check for discontig memory) That change converted the (wrong) assumption of contiguous nodes' memory to a similarly wrong one of assuming discontiguous memory (i.e. each node having separate E820 table entries). The code ought to be able to deal with both, though, and I hope this change makes it so. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Acked-by: Alex Williamson <alex.williamson@xxxxxx> --- xen/arch/x86/srat.c | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff -r cf95641ba1d0 -r 27b3bd0a47fd xen/arch/x86/srat.c --- a/xen/arch/x86/srat.c Mon Aug 31 10:09:12 2009 +0100 +++ b/xen/arch/x86/srat.c Mon Aug 31 10:10:17 2009 +0100 @@ -249,15 +249,23 @@ static int nodes_cover_memory(void) start = e820.map[i].addr; end = e820.map[i].addr + e820.map[i].size - 1; - found = 0; - for_each_node_mask(j, nodes_parsed) { - if (start >= nodes[j].start && end <= nodes[j].end) { - found = 1; - break; - } - } - - if (!found) { + do { + found = 0; + for_each_node_mask(j, nodes_parsed) + if (start < nodes[j].end + && end > nodes[j].start) { + if (start >= nodes[j].start) { + start = nodes[j].end; + found = 1; + } + if (end <= nodes[j].end) { + end = nodes[j].start; + found = 1; + } + } + } while (found && start < end); + + if (start < end) { printk(KERN_ERR "SRAT: No PXM for e820 range: " "%016Lx - %016Lx\n", start, end); return 0; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |