From patchwork Tue Jun 30 10:54:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 33090 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5UAu2wA021147 for ; Tue, 30 Jun 2009 10:56:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755911AbZF3Kyf (ORCPT ); Tue, 30 Jun 2009 06:54:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756754AbZF3Kye (ORCPT ); Tue, 30 Jun 2009 06:54:34 -0400 Received: from mx2.redhat.com ([66.187.237.31]:39748 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754042AbZF3Kyd (ORCPT ); Tue, 30 Jun 2009 06:54:33 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5UAsaH3000659 for ; Tue, 30 Jun 2009 06:54:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5UAsZNZ011443; Tue, 30 Jun 2009 06:54:35 -0400 Received: from localhost (vpn-12-109.rdu.redhat.com [10.11.12.109]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5UAsXtT018451; Tue, 30 Jun 2009 06:54:34 -0400 From: Amit Shah To: avi@redhat.com Cc: kvm@vger.kernel.org, Amit Shah Subject: [PATCH] kvm: x86: ignore reads to perfctr msrs Date: Tue, 30 Jun 2009 16:24:28 +0530 Message-Id: <1246359268-11327-1-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- 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 af53f64..f358bb6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1045,9 +1045,12 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) case MSR_K8_SYSCFG: case MSR_K7_HWCR: 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: case MSR_K8_INT_PENDING_MSG: data = 0; break;