From: Amit Shah Date: Mon, 3 Aug 2009 17:57:55 +0000 (-0300) Subject: KVM: x86: Ignore reads to EVNTSEL MSRs X-Git-Tag: v2.6.30.6~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70f04604e099f62de013c7910cd43a3507433541;p=thirdparty%2Fkernel%2Fstable.git KVM: x86: Ignore reads to EVNTSEL MSRs (cherry picked from commit 7fe29e0faacb650d31b9e9f538203a157bec821d) We ignore writes to the performance counters and performance event selector registers already. Kaspersky antivirus reads the eventsel MSR causing it to crash with the current behaviour. Return 0 as data when the eventsel registers are read to stop the crash. Signed-off-by: Amit Shah Signed-off-by: Avi Kivity Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index bbacdce35c4d5..3877da1d0e619 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -898,6 +898,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) case MSR_IA32_LASTINTFROMIP: case MSR_IA32_LASTINTTOIP: case MSR_VM_HSAVE_PA: + case MSR_P6_EVNTSEL0: + case MSR_P6_EVNTSEL1: data = 0; break; case MSR_MTRRcap: