mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: avi@qumranet.com, patches@x86-64.org,
	linux-kernel@vger.kernel.org, stable@kernel.org
Subject: [PATCH 2.6.22] [5/5] i386: Handle P6s without performance counters in nmi watchdog
Date: Wed, 15 Aug 2007 12:38:58 +0200 (CEST)	[thread overview]
Message-ID: <20070815103858.7FE3914F8E@wotan.suse.de> (raw)
In-Reply-To: <200708151238.148026000@suse.de>


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@qumranet.com

Signed-off-by: Andi Kleen <ak@suse.de>

---
 arch/i386/kernel/cpu/perfctr-watchdog.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6.22-stable/arch/i386/kernel/cpu/perfctr-watchdog.c
===================================================================
--- linux-2.6.22-stable.orig/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ linux-2.6.22-stable/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -346,7 +346,9 @@ static int setup_p6_watchdog(unsigned nm
 	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

      parent reply	other threads:[~2007-08-15 10:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 10:38 [PATCH 2.6.22] [0/5] x86 updates for 2.6.22-stable Andi Kleen
2007-08-15 10:38 ` [PATCH 2.6.22] [1/5] i386: allow debuggers to access the vsyscall page with compat vDSO Andi Kleen
2007-08-15 10:38 ` [PATCH 2.6.22] [2/5] x86_64: Check for .cfi_rel_offset in CFI probe Andi Kleen
2007-08-15 10:38 ` [PATCH 2.6.22] [3/5] x86_64: Change PMDS invocation to single macro Andi Kleen
2007-08-15 10:38 ` [PATCH 2.6.22] [4/5] i386: Fix double fault handler Andi Kleen
2007-08-15 10:38 ` Andi Kleen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070815103858.7FE3914F8E@wotan.suse.de \
    --to=ak@suse.de \
    --cc=avi@qumranet.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@x86-64.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®