From: Greg Kroah-Hartman Date: Tue, 25 Sep 2012 20:17:15 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.44~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bebd4c37e467068921a3c47fab5aec17d47366f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: xen-boot-disable-numa-for-pv-guests.patch --- diff --git a/queue-3.0/series b/queue-3.0/series index 82f4b8f7355..7a8ce514031 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -48,3 +48,4 @@ hwmon-twl4030-madc-hwmon-initialize-uninitialized-structure-elements.patch can-mcp251x-avoid-repeated-frame-bug.patch mm-ia64-fix-a-memory-block-size-bug.patch memory-hotplug-fix-section-info-double-registration-bug.patch +xen-boot-disable-numa-for-pv-guests.patch diff --git a/queue-3.0/xen-boot-disable-numa-for-pv-guests.patch b/queue-3.0/xen-boot-disable-numa-for-pv-guests.patch new file mode 100644 index 00000000000..34a8e6f7e96 --- /dev/null +++ b/queue-3.0/xen-boot-disable-numa-for-pv-guests.patch @@ -0,0 +1,91 @@ +From 8d54db795dfb1049d45dc34f0dddbc5347ec5642 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Fri, 17 Aug 2012 10:22:37 -0400 +Subject: xen/boot: Disable NUMA for PV guests. + +From: Konrad Rzeszutek Wilk + +commit 8d54db795dfb1049d45dc34f0dddbc5347ec5642 upstream. + +The hypervisor is in charge of allocating the proper "NUMA" memory +and dealing with the CPU scheduler to keep them bound to the proper +NUMA node. The PV guests (and PVHVM) have no inkling of where they +run and do not need to know that right now. In the future we will +need to inject NUMA configuration data (if a guest spans two or more +NUMA nodes) so that the kernel can make the right choices. But those +patches are not yet present. + +In the meantime, disable the NUMA capability in the PV guest, which +also fixes a bootup issue. Andre says: + +"we see Dom0 crashes due to the kernel detecting the NUMA topology not +by ACPI, but directly from the northbridge (CONFIG_AMD_NUMA). + +This will detect the actual NUMA config of the physical machine, but +will crash about the mismatch with Dom0's virtual memory. Variation of +the theme: Dom0 sees what it's not supposed to see. + +This happens with the said config option enabled and on a machine where +this scanning is still enabled (K8 and Fam10h, not Bulldozer class) + +We have this dump then: +NUMA: Warning: node ids are out of bound, from=-1 to=-1 distance=10 +Scanning NUMA topology in Northbridge 24 +Number of physical nodes 4 +Node 0 MemBase 0000000000000000 Limit 0000000040000000 +Node 1 MemBase 0000000040000000 Limit 0000000138000000 +Node 2 MemBase 0000000138000000 Limit 00000001f8000000 +Node 3 MemBase 00000001f8000000 Limit 0000000238000000 +Initmem setup node 0 0000000000000000-0000000040000000 + NODE_DATA [000000003ffd9000 - 000000003fffffff] +Initmem setup node 1 0000000040000000-0000000138000000 + NODE_DATA [0000000137fd9000 - 0000000137ffffff] +Initmem setup node 2 0000000138000000-00000001f8000000 + NODE_DATA [00000001f095e000 - 00000001f0984fff] +Initmem setup node 3 00000001f8000000-0000000238000000 +Cannot find 159744 bytes in node 3 +BUG: unable to handle kernel NULL pointer dereference at (null) +IP: [] __alloc_bootmem_node+0x43/0x96 +Pid: 0, comm: swapper Not tainted 3.3.6 #1 AMD Dinar/Dinar +RIP: e030:[] [] __alloc_bootmem_node+0x43/0x96 +.. snip.. + [] sparse_early_usemaps_alloc_node+0x64/0x178 + [] sparse_init+0xe4/0x25a + [] paging_init+0x13/0x22 + [] setup_arch+0x9c6/0xa9b + [] ? printk+0x3c/0x3e + [] start_kernel+0xe5/0x468 + [] x86_64_start_reservations+0xba/0xc1 + [] ? xen_setup_runstate_info+0x2c/0x36 + [] xen_start_kernel+0x565/0x56c +" + +so we just disable NUMA scanning by setting numa_off=1. + +Reported-and-Tested-by: Andre Przywara +Acked-by: Andre Przywara +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/setup.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/x86/xen/setup.c ++++ b/arch/x86/xen/setup.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -463,4 +464,7 @@ void __init xen_arch_setup(void) + boot_option_idle_override = IDLE_HALT; + + fiddle_vdso(); ++#ifdef CONFIG_NUMA ++ numa_off = 1; ++#endif + }