Module Name: src
Committed By: chs
Date: Thu Feb 23 14:45:55 UTC 2012
Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/i386/i386: machdep.c
src/sys/arch/x86/x86: identcpu.c
Log Message:
move XEN CPU feature masking into cpu_probe() so that it's applied
to all CPUs, not just the boot CPU.
To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.719 -r1.720 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/identcpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.177 src/sys/arch/amd64/amd64/machdep.c:1.178
--- src/sys/arch/amd64/amd64/machdep.c:1.177 Sun Feb 19 23:15:24 2012
+++ src/sys/arch/amd64/amd64/machdep.c Thu Feb 23 14:45:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.177 2012/02/19 23:15:24 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.178 2012/02/23 14:45:54 chs Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.177 2012/02/19 23:15:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.178 2012/02/23 14:45:54 chs Exp $");
/* #define XENDEBUG_LOW */
@@ -1591,8 +1591,6 @@ init_x86_64(paddr_t first_avail)
__PRINTK(("init_x86_64(0x%lx)\n", first_avail));
#endif /* XEN */
- cpu_feature[0] &= ~CPUID_FEAT_BLACKLIST;
-
cpu_init_msrs(&cpu_info_primary, true);
pcb = lwp_getpcb(&lwp0);
Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.719 src/sys/arch/i386/i386/machdep.c:1.720
--- src/sys/arch/i386/i386/machdep.c:1.719 Wed Feb 22 18:35:26 2012
+++ src/sys/arch/i386/i386/machdep.c Thu Feb 23 14:45:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.719 2012/02/22 18:35:26 bouyer Exp $ */
+/* $NetBSD: machdep.c,v 1.720 2012/02/23 14:45:55 chs Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.719 2012/02/22 18:35:26 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.720 2012/02/23 14:45:55 chs Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1284,8 +1284,6 @@ init386(paddr_t first_avail)
uvm_lwp_setuarea(&lwp0, lwp0uarea);
pcb = lwp_getpcb(&lwp0);
- cpu_feature[0] &= ~CPUID_FEAT_BLACKLIST;
-
cpu_init_msrs(&cpu_info_primary, true);
#ifdef PAE
Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.29 src/sys/arch/x86/x86/identcpu.c:1.30
--- src/sys/arch/x86/x86/identcpu.c:1.29 Fri Feb 3 05:06:51 2012
+++ src/sys/arch/x86/x86/identcpu.c Thu Feb 23 14:45:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.29 2012/02/03 05:06:51 yamt Exp $ */
+/* $NetBSD: identcpu.c,v 1.30 2012/02/23 14:45:55 chs Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.29 2012/02/03 05:06:51 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.30 2012/02/23 14:45:55 chs Exp $");
#include "opt_xen.h"
@@ -700,6 +700,7 @@ cpu_probe(struct cpu_info *ci)
wrmsr(MSR_MISC_ENABLE, rdmsr(MSR_MISC_ENABLE) | (1<<3));
}
+ ci->ci_feat_val[0] &= ~CPUID_FEAT_BLACKLIST;
if (ci == &cpu_info_primary) {
/* If first. Boot Processor is the cpu_feature reference. */
for (i = 0; i < __arraycount(cpu_feature); i++) {