public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Ignore reads to EVNTSEL MSRs
@ 2009-03-20  7:09 Amit Shah
  2009-03-22  9:11 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Shah @ 2009-03-20  7:09 UTC (permalink / raw)
  To: avi; +Cc: kvm, Amit Shah

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>
---
 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:
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: x86: Ignore reads to EVNTSEL MSRs
  2009-03-20  7:09 [PATCH] KVM: x86: Ignore reads to EVNTSEL MSRs Amit Shah
@ 2009-03-22  9:11 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-03-22  9:11 UTC (permalink / raw)
  To: Amit Shah; +Cc: kvm

Amit Shah wrote:
> 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.
>   


Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-22  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20  7:09 [PATCH] KVM: x86: Ignore reads to EVNTSEL MSRs Amit Shah
2009-03-22  9:11 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox