Skip to content

Commit

Permalink
KVM: PIT: fix i8254 pending count read
Browse files Browse the repository at this point in the history
count_load_time assignment is bogus: its supposed to contain what it
means, not the expiration time.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Feb 15, 2009
1 parent ba4cef3 commit d2a8284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int __pit_timer_fn(struct kvm_kpit_state *ps)
hrtimer_add_expires_ns(&pt->timer, pt->period);
pt->scheduled = hrtimer_get_expires_ns(&pt->timer);
if (pt->period)
ps->channels[0].count_load_time = hrtimer_get_expires(&pt->timer);
ps->channels[0].count_load_time = ktime_get();

return (pt->period == 0 ? 0 : 1);
}
Expand Down

0 comments on commit d2a8284

Please sign in to comment.