Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 423

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

From a26656598d8abe5edb83cb652c346eff2984d7a0 Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Mon, 15 Jun 2009 14:33:55 +0530
Subject: [PATCH 1/3] KVM: x86: Ignore reads to K7 EVNTSEL MSRs

[For bz 482423. Fix sent upstream, waiting for inclusion. Upstream fix
applies cleanly w/o fuzz to rhel5/master.]

Please ACK.

>From 44acbeb72d4da4bfe09cfd69202a104115e5dc7b Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Mon, 15 Jun 2009 12:16:55 +0530
Subject: [PATCH] KVM: x86: Ignore reads to K7 EVNTSEL MSRs

In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the
reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines.

Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD
hosts.

This fixes Kaspersky antivirus crashing Windows guests on AMD hosts.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Message-ID: <20090615090355.GA10449@amit-x200.redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Avi Kivity <avi@redhat.com>
Acked-by: Dor Laor <dlaor@redhat.com>
Message-ID: <20090615142011.GB14373@amit-x200.redhat.com>
RH-Upstream-status: applied(kvm/master)
Bugzilla: 504237
---
 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f61e915..e91482a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -847,6 +847,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 	case MSR_VM_HSAVE_PA:
 	case MSR_P6_EVNTSEL0:
 	case MSR_P6_EVNTSEL1:
+	case MSR_K7_EVNTSEL0:
 		data = 0;
 		break;
 	case MSR_MTRRcap:
-- 
1.6.3.rc4.29.g8146