kvm: x86: only channel 0 of the i8254 is linked to the HPET
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2016 12:50:38 +0000 (13:50 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 Jan 2016 21:40:09 +0000 (21:40 +0000)
commitef90cf3d0b59e3b1dcfe94d1a241107667e6e96a
tree61526a137aa14e0cea12bbac26613c6518003569
parent08b8d1a6ccdefd3d517d04c472b7f42f51b3059b
kvm: x86: only channel 0 of the i8254 is linked to the HPET

commit e5e57e7a03b1cdcb98e4aed135def2a08cbf3257 upstream.

While setting the KVM PIT counters in 'kvm_pit_load_count', if
'hpet_legacy_start' is set, the function disables the timer on
channel[0], instead of the respective index 'channel'. This is
because channels 1-3 are not linked to the HPET.  Fix the caller
to only activate the special HPET processing for channel 0.

Reported-by: P J P <pjp@fedoraproject.org>
Fixes: 0185604c2d82c560dab2f2933a18f797e74ab5a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kvm/i8254.c
arch/x86/kvm/x86.c