From ef82754f37988ea7caa030a6801647ac0a82838a Mon Sep 17 00:00:00 2001 From: Amit Shah <amit.shah@redhat.com> Date: Tue, 30 Jun 2009 16:32:49 +0530 Subject: [PATCH] kvm: x86: ignore reads to perfctr msrs Bug 482423 - Kaspersky AV crash the VM after installation still continues to haunt me. This time, the AV crashes after doing a full update and then scanning for viruses. Ignoring reads to perfctr msrs fixes it. I've sent the fix upstream as well. Below is the backported version of the fix. Please ACK. Amit >From 0041609280c149a1225d3e7db6b8061bd2db5ac4 Mon Sep 17 00:00:00 2001 From: Amit Shah <amit.shah@redhat.com> Date: Tue, 30 Jun 2009 16:28:28 +0530 Subject: [PATCH] kvm: x86: ignore reads to perfctr msrs We ignore writes to the perfctr msrs. Ignore reads as well. Kaspersky antivirus crashes Windows guests if it can't read these MSRs. Signed-off-by: Amit Shah <amit.shah@redhat.com> Message-ID: <20090630110249.GA11562@amit-x200.redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 482423 RH-Upstream-status: applied Acked-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: john cooper <john.cooper@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> --- arch/x86/kvm/x86.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 80abb6a..c540b08 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -849,9 +849,12 @@ 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_PERFCTR0: + case MSR_P6_PERFCTR1: case MSR_P6_EVNTSEL0: case MSR_P6_EVNTSEL1: case MSR_K7_EVNTSEL0: + case MSR_K7_PERFCTR0: data = 0; break; case MSR_MTRRcap: -- 1.6.3.rc4.29.g8146