Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57c22f49e4c7d27a03e109a317c30b12f1bae0b2 Commit: 57c22f49e4c7d27a03e109a317c30b12f1bae0b2 Parent: f25f64ed5bd3c2932493681bdfdb483ea707da0a Author: Andi Kleen <[EMAIL PROTECTED]> AuthorDate: Sun Jul 22 11:12:39 2007 +0200 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sun Jul 22 11:03:38 2007 -0700
i386: Handle P6s without performance counters in nmi watchdog I got an oops while booting a 32bit kernel on KVM because it doesn't implement performance counters used by the NMI watchdog. Handle this case. Cc: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/i386/kernel/cpu/perfctr-watchdog.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c index 30b5e48..5729003 100644 --- a/arch/i386/kernel/cpu/perfctr-watchdog.c +++ b/arch/i386/kernel/cpu/perfctr-watchdog.c @@ -346,7 +346,9 @@ static int setup_p6_watchdog(unsigned nmi_hz) perfctr_msr = MSR_P6_PERFCTR0; evntsel_msr = MSR_P6_EVNTSEL0; - wrmsrl(perfctr_msr, 0UL); + /* KVM doesn't implement this MSR */ + if (wrmsr_safe(perfctr_msr, 0, 0) < 0) + return 0; evntsel = P6_EVNTSEL_INT | P6_EVNTSEL_OS - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html