Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 471

kvm-83-270.el5_11.src.rpm

From c5941bc786984acdd0a6a354b6182f6887d40391 Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Fri, 29 Jan 2010 19:43:09 -0200
Subject: [PATCH] KVM: PIT: control word is write-only

RH-Author: Marcelo Tosatti <mtosatti@redhat.com>
Message-id: <20100129194309.GB17352@amt.cnet>
Patchwork-id: 6799
O-Subject: [RHEL 5.5 5.4.z] KVM: PIT: control word is write-only
Bugzilla: 553126
RH-Acked-by: Glauber Costa <glommer@redhat.com>
RH-Acked-by: Gleb Natapov <gleb@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>

PIT control word (address 0x43) is write-only, reads are undefined.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Bugzilla: 553126

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 arch/x86/kvm/i8254.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 7fc515d..4cc536a 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -419,6 +419,9 @@ static void pit_ioport_read(struct kvm_io_device *this,
 	struct kvm_kpit_channel_state *s;
 
 	addr &= KVM_PIT_CHANNEL_MASK;
+	if (addr == 3)
+		return;
+		
 	s = &pit_state->channels[addr];
 
 	mutex_lock(&pit_state->lock);
-- 
1.6.3.rc4.29.g8146