From patchwork Fri Mar 20 07:09:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 13231 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 n2K78vp7031879 for ; Fri, 20 Mar 2009 07:08:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751920AbZCTHIz (ORCPT ); Fri, 20 Mar 2009 03:08:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751484AbZCTHIz (ORCPT ); Fri, 20 Mar 2009 03:08:55 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42622 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750699AbZCTHIy (ORCPT ); Fri, 20 Mar 2009 03:08:54 -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 n2K78rGU002772 for ; Fri, 20 Mar 2009 03:08:53 -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 n2K78oAJ028442; Fri, 20 Mar 2009 03:08:50 -0400 Received: from localhost (vpn-12-114.rdu.redhat.com [10.11.12.114]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2K78mJM009709; Fri, 20 Mar 2009 03:08:49 -0400 From: Amit Shah To: avi@redhat.com Cc: kvm@vger.kernel.org, Amit Shah Subject: [PATCH] KVM: x86: Ignore reads to EVNTSEL MSRs Date: Fri, 20 Mar 2009 12:39:00 +0530 Message-Id: <1237532940-26389-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 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 --- 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 2ea8262..03431b2 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -891,6 +891,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: