diff options
author | Chris Lalancette <clalance@redhat.com> | 2008-05-05 13:05:16 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 12:40:49 +0300 |
commit | 14ae51b6c068ef7ab52dc2d53fe226e6189f2ab2 (patch) | |
tree | 1abe5475c427980663865a0231198c7a20afe1dc /arch/x86/math-emu | |
parent | f697554515b06e8d7264f316b25e6da943407142 (diff) |
KVM: SVM: Fake MSR_K7 performance counters
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.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/math-emu')
0 files changed, 0 insertions, 0 deletions