26 lines
714 B
Diff
26 lines
714 B
Diff
commit 336f40a728b9a4a5db5e1df5c89852c79ff95604
|
|
Author: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Date: Fri Jan 29 17:28:41 2010 -0200
|
|
|
|
KVM: PIT: control word is write-only
|
|
|
|
PIT control word (address 0x43) is write-only, reads are undefined.
|
|
|
|
Cc: stable@kernel.org
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
|
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
|
|
index caad189..6a74246 100644
|
|
--- a/arch/x86/kvm/i8254.c
|
|
+++ b/arch/x86/kvm/i8254.c
|
|
@@ -467,6 +467,9 @@ static int pit_ioport_read(struct kvm_io_device *this,
|
|
return -EOPNOTSUPP;
|
|
|
|
addr &= KVM_PIT_CHANNEL_MASK;
|
|
+ if (addr == 3)
|
|
+ return 0;
|
|
+
|
|
s = &pit_state->channels[addr];
|
|
|
|
mutex_lock(&pit_state->lock);
|