Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > aadbe78a25743146bb784eee19f007c5 > files > 326

kvm-83-164.el5_5.9.src.rpm

From 6c6cfaca05025faf7f818eb88df6f483181cd9fc Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Mon, 23 Mar 2009 11:01:10 +0530
Subject: [PATCH] Backport fix for bz 482423 from upstream

Upstream kernel fix for bz 482423. This fixes a Kaspersky antivirus
crash on Windows VMs.

commit 4f7623153da786a5a79ff4c59d29c220a3bfe60d
Author: Amit Shah <amit.shah@redhat.com>
Date:   Fri Mar 20 12:39:00 2009 +0530

    KVM: x86: Ignore reads to EVNTSEL MSRs

    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 <amit.shah@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>

[ehabkost: fixed broken patch and rejects by hand]

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Upstream-status: applied(kvm/master)
Bugzilla: 482423
Acked-by: Avi Kivity <avi@redhat.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
---
 arch/x86/kvm/x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 73533a3..fa1ecff 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -845,6 +845,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:
-- 
1.6.1