Pārlūkot izejas kodu

KVM: PIT: fix i8254 pending count read

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>
Marcelo Tosatti 16 gadi atpakaļ
vecāks
revīzija
d2a8284e8f
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      arch/x86/kvm/i8254.c

+ 1 - 1
arch/x86/kvm/i8254.c

@@ -207,7 +207,7 @@ static int __pit_timer_fn(struct kvm_kpit_state *ps)
 	hrtimer_add_expires_ns(&pt->timer, pt->period);
 	hrtimer_add_expires_ns(&pt->timer, pt->period);
 	pt->scheduled = hrtimer_get_expires_ns(&pt->timer);
 	pt->scheduled = hrtimer_get_expires_ns(&pt->timer);
 	if (pt->period)
 	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);
 	return (pt->period == 0 ? 0 : 1);
 }
 }