[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: make pxm_to_node() return sane values when disabling NUMA internally



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1272280290 -3600
# Node ID d01ea51fc929c57c7d5f427e1aafa0de7a436473
# Parent  f766f2142a8515d1dc71783355dc4fc1813d95c4
x86: make pxm_to_node() return sane values when disabling NUMA internally

Otherwise, pass-through code may call memory allocation functions with
invalid node IDs, causing the allocations to fail.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/srat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r f766f2142a85 -r d01ea51fc929 xen/arch/x86/srat.c
--- a/xen/arch/x86/srat.c       Mon Apr 26 06:52:44 2010 +0100
+++ b/xen/arch/x86/srat.c       Mon Apr 26 12:11:30 2010 +0100
@@ -25,7 +25,7 @@ static nodemask_t nodes_parsed __initdat
 static nodemask_t nodes_parsed __initdata;
 static nodemask_t nodes_found __initdata;
 static struct node nodes[MAX_NUMNODES] __initdata;
-static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff };
+static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE };
 
 
 static int num_node_memblks;
@@ -112,6 +112,8 @@ static __init void bad_srat(void)
        acpi_numa = -1;
        for (i = 0; i < MAX_LOCAL_APIC; i++)
                apicid_to_node[i] = NUMA_NO_NODE;
+       for (i = 0; i < ARRAY_SIZE(pxm2node); i++)
+               pxm2node[i] = NUMA_NO_NODE;
 }
 
 #ifdef CONFIG_X86_64

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.