linux/arch
Chris Lalancette 14ae51b6c0 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>
2008-07-20 12:40:49 +03:00
..
alpha Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
arm Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
avr32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-07-16 15:17:52 -07:00
blackfin Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
cris Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
frv PCI: remove unused arch pcibios_update_resource() functions 2008-06-27 13:14:01 -07:00
h8300 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
ia64 fix build error of arch/ia64/kvm/* 2008-07-17 09:16:31 -07:00
m32r smp_call_function: get rid of the unused nonatomic/retry argument 2008-06-26 11:24:35 +02:00
m68k Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
m68knommu Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
mips Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
mn10300 mn10300: provide __ucmpdi2() for MN10300 2008-07-04 10:40:07 -07:00
parisc Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
powerpc powerpc/ep8248e: Fix compile problem if !CONFIG_FS_ENET 2008-07-16 11:43:48 -07:00
s390 [S390] Fix stacktrace compile bug. 2008-07-17 17:22:09 +02:00
sh Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
sparc Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
sparc64 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
um Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
v850 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
x86 KVM: SVM: Fake MSR_K7 performance counters 2008-07-20 12:40:49 +03:00
xtensa [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig Add generic helpers for arch IPI function calls 2008-06-26 11:21:34 +02:00