|
Message-ID: <20110503192040.GA18609@albatros>
Date: Tue, 3 May 2011 23:20:41 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: kernel 028stab089.1
Solar,
On Tue, May 03, 2011 at 14:09 +0400, Solar Designer wrote:
> > http://wiki.openvz.org/Download/kernel/rhel5-testing/028stab089.1
I'm currently trying to compile it and faced with a problem. In recent
changes I noticed:
diff -u linux-2.6.18.ovz/arch/i386/kernel/cpu/amd.c linux-2.6.18.ovz/arch/i386/kernel/cpu/amd.c
--- linux-2.6.18.ovz/arch/i386/kernel/cpu/amd.c 2011-03-11 13:36:12.000000000 +0300
+++ linux-2.6.18.ovz/arch/i386/kernel/cpu/amd.c 2011-04-14 15:24:56.000000000 +0400
@@ -45,10 +45,24 @@
if (cpu_has(c, X86_FEATURE_AMD_DCM))
return;
- /* proceed only if there is a valid AMD northbridge
- * (not in virtualized environments!)
+ /* RHEL5: Check for a valid AMD northbridge device, which does
+ * not exist in virtualized environments.
+ *
+ * The check is needed for running as guest system on top of a
+ * 5.4.z Xen hypervisor. The 5.4.z Xen hypervisor does not mask
+ * the NodeID MSR from the guest. Without this check the guest
+ * system would perform the multi-node fixup routines, eventually
+ * resulting in a panic of the guest system.
+ *
+ * This check does not need to be extended for future CPU families
+ * and models. CPU family 16, model 9 is the only affected model
+ * which is supported by 5.4.z. From 5.5 onwards, the NodeID MSR
+ * is properly masked from the guest system.
+ *
+ * Bugzilla references: 547518, 560013, 667234
*/
- if (!early_is_k8_nb(read_pci_config(0, 24, 3, 0x00)))
+ if ((c->x86 == 0x10) && (c->x86_model == 9) &&
+ !early_is_k8_nb(read_pci_config(0, 24, 3, 0x00)))
return;
rdmsrl(0xc001100c, value);
--
The same for x86_64. We have this block commented out. If uncomment it
(comment says the problem is fixed), I got a failed compilation:
LD init/built-in.o
LD .tmp_vmlinux1
arch/i386/kernel/built-in.o: In function `amd_fixup_dcm':
amd.c:(.init.text+0x2fb0): undefined reference to `early_is_k8_nb'
I wonder how are RHEL6 and OpenVZ kernels compilable without the change?
Is it OK to leave this '#if 0' as is?
diff -urp linux-2.6.18.orig/arch/i386/kernel/cpu/amd.c linux-2.6.18/arch/i386/kernel/cpu/amd.c
--- linux-2.6.18.orig/arch/i386/kernel/cpu/amd.c 2011-03-23 13:35:25 0000
+++ linux-2.6.18/arch/i386/kernel/cpu/amd.c 2011-03-11 16:08:40 0000
@@ -45,11 +45,14 @@ static void __cpuinit amd_fixup_dcm(stru
if (cpu_has(c, X86_FEATURE_AMD_DCM))
return;
+#if 0
+/* early_is_k8_nb() is only defined under arch/x86_64/ */
/* proceed only if there is a valid AMD northbridge
* (not in virtualized environments!)
*/
if (!early_is_k8_nb(read_pci_config(0, 24, 3, 0x00)))
return;
+#endif
rdmsrl(0xc001100c, value);
--
--
Vasiliy
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.