kernel-fxtec-pro1x/arch/x86/kvm
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
..
i8254.c KVM: PIT: support mode 3 2008-07-20 12:40:49 +03:00
i8254.h KVM: Add reset support for in kernel PIT 2008-04-27 12:00:23 +03:00
i8259.c KVM: Move arch dependent files to new directory arch/x86/kvm/ 2008-01-30 18:01:18 +02:00
irq.c KVM: migrate PIT timer 2008-06-06 21:25:51 +03:00
irq.h KVM: migrate PIT timer 2008-06-06 21:25:51 +03:00
Kconfig KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
kvm_svm.h KVM: SVM: allocate the MSR permission map per VCPU 2008-04-27 11:53:21 +03:00
lapic.c KVM: VMX: move APIC_ACCESS trace entry to generic code 2008-07-20 12:40:47 +03:00
lapic.h KVM: add statics were possible, function definition in lapic.h 2008-07-20 12:40:46 +03:00
Makefile KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
mmu.c KVM: add statics were possible, function definition in lapic.h 2008-07-20 12:40:46 +03:00
mmu.h KVM: Add kvm_x86_ops get_tdp_level() 2008-05-04 14:44:34 +03:00
paging_tmpl.h KVM: MMU: Fix printk() format string 2008-06-06 21:36:20 +03:00
svm.c KVM: SVM: Fake MSR_K7 performance counters 2008-07-20 12:40:49 +03:00
svm.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: move APIC_ACCESS trace entry to generic code 2008-07-20 12:40:47 +03:00
vmx.h KVM: VMX: Enable EPT feature for KVM 2008-05-04 14:44:42 +03:00
x86.c KVM: add missing kvmtrace bits 2008-07-20 12:40:48 +03:00
x86_emulate.c KVM: x86 emulator: fix hypercall return value on AMD 2008-06-06 21:08:25 +03:00