summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-01-29 17:28:41 -0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-02-23 07:37:52 -0800
commitd632dfd88b02f1f89cbb9ec2d595580d1eba03bf (patch)
treeae83b0321488256b19522de37f31484d2011d89d /arch
parentaa1dcdd6eb7f457dee130987d5d5229e5a67184c (diff)
KVM: PIT: control word is write-only
commit ee73f656a604d5aa9df86a97102e4e462dd79924 upstream. PIT control word (address 0x43) is write-only, reads are undefined. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/i8254.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 144e7f60b5e2..88ad1627a89d 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -465,6 +465,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);