WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] x86: make pxm_to_node() return sane va

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: make pxm_to_node() return sane values when disabling NUMA internally
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2010 00:41:20 -0700
Delivery-date: Fri, 14 May 2010 00:45:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273480702 -3600
# Node ID 0031e33d028f426f331cf3ae6f18d2b115856045
# Parent  7d1d4abd8b4403d619c2365226eceeb74e1aca32
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-unstable changeset:   21234:d01ea51fc929
xen-unstable date:        Mon Apr 26 12:11:30 2010 +0100
---
 xen/arch/x86/srat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 7d1d4abd8b44 -r 0031e33d028f xen/arch/x86/srat.c
--- a/xen/arch/x86/srat.c       Fri Apr 23 08:45:16 2010 +0100
+++ b/xen/arch/x86/srat.c       Mon May 10 09:38:22 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86: make pxm_to_node() return sane values when disabling NUMA internally, Xen patchbot-4.0-testing <=