Skip to content

Commit

Permalink
KVM: PIT: control word is write-only
Browse files Browse the repository at this point in the history
PIT control word (address 0x43) is write-only, reads are undefined.

Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Feb 9, 2010
1 parent 923de3c commit ee73f65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ee73f65

Please sign in to comment.