From: Avi Kivity <avi@qumranet.com>
To: Chris Lalancette <clalance@redhat.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH]: Fake MSR_K7 performance counters
Date: Tue, 06 May 2008 14:28:29 +0300 [thread overview]
Message-ID: <482040DD.8000808@qumranet.com> (raw)
In-Reply-To: <481F3E4C.2050300@redhat.com>
Chris Lalancette wrote:
> Attached is a patch that fixes a guest crash when booting older Linux kernels.
> The problem stems from the fact that we are currently emulating
> MSR_K7_EVNTSEL[0-3], but not emulating MSR_K7_PERFCTR[0-3]. Because of this,
> setup_k7_watchdog() in the Linux kernel receives a GPF when it attempts to write
> into MSR_K7_PERFCTR, which causes an OOPs.
>
> The patch fixes it by just "fake" emulating the appropriate MSRs, throwing away
> the data in the process. This causes the NMI watchdog to not actually work, but
> it's not such a big deal in a virtualized environment.
>
> When we get a write to one of these counters, we printk_ratelimit() a warning.
> I decided to print it out for all writes, even if the data is 0; it doesn't seem
> to make sense to me to special case when data == 0.
>
> Tested by myself on a RHEL-4 guest, and Joerg Roedel on a Windows XP 64-bit guest.
>
Applied, thanks.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-05-06 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 17:05 [PATCH]: Fake MSR_K7 performance counters Chris Lalancette
2008-05-06 11:28 ` Avi Kivity [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-28 16:45 Chris Lalancette
2008-05-01 14:23 ` Chris Lalancette
2008-05-02 10:00 ` Avi Kivity
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=482040DD.8000808@qumranet.com \
--to=avi@qumranet.com \
--cc=clalance@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.