|
@@ -200,9 +200,12 @@ int __pit_timer_fn(struct kvm_kpit_state *ps)
|
|
|
|
|
|
atomic_inc(&pt->pending);
|
|
atomic_inc(&pt->pending);
|
|
smp_mb__after_atomic_inc();
|
|
smp_mb__after_atomic_inc();
|
|
- if (vcpu0 && waitqueue_active(&vcpu0->wq)) {
|
|
|
|
- vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
|
|
|
|
- wake_up_interruptible(&vcpu0->wq);
|
|
|
|
|
|
+ if (vcpu0) {
|
|
|
|
+ set_bit(KVM_REQ_PENDING_TIMER, &vcpu0->requests);
|
|
|
|
+ if (waitqueue_active(&vcpu0->wq)) {
|
|
|
|
+ vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
|
|
|
|
+ wake_up_interruptible(&vcpu0->wq);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
pt->timer.expires = ktime_add_ns(pt->timer.expires, pt->period);
|
|
pt->timer.expires = ktime_add_ns(pt->timer.expires, pt->period);
|