KVM: PIT: fix count read and mode 0 handling
authorMarcelo Tosatti <mtosatti@redhat.com>
Wed, 8 Apr 2009 16:14:19 +0000 (13:14 -0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:39 +0000 (11:48 +0300)
commitede2ccc51742059d356d419260460cbbf3e36273
tree9a38010c1d6c2fcdb3d566b2d154d5f8f6a14680
parent2906e79f21a559e49611e1e188c4993cd45d9ce1
KVM: PIT: fix count read and mode 0 handling

Commit 46ee278652f4cbd51013471b64c7897ba9bcd1b1 causes Solaris 10
to hang on boot.

Assuming that PIT counter reads should return 0 for an expired timer
is wrong: when it is active, the counter never stops (see comment on
__kpit_elapsed).

Also arm a one shot timer for mode 0.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/i8254.c