diff options
author | Avi Kivity <avi@qumranet.com> | 2008-04-24 19:44:17 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-24 19:45:44 +0300 |
commit | 8d6e265250137db168e1a052b30cf5c7e8a59528 (patch) | |
tree | db56d92c8827445dc1ceb25ea8ab0adb457881da | |
parent | 58db4c9141035200d6816181e60870319f79a2fa (diff) |
The fix caused IPIs to be fired from interrupt context, which can cause hard
hangs if they catch another IPI in progress.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | arch/x86/kvm/i8254.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 5697ad276c3d..361e31611276 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -200,8 +200,11 @@ int __pit_timer_fn(struct kvm_kpit_state *ps) atomic_inc(&pt->pending); smp_mb__after_atomic_inc(); - if (vcpu0) - kvm_vcpu_kick(vcpu0); + /* FIXME: handle case where the guest is in guest mode */ + if (vcpu0 && 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->scheduled = ktime_to_ns(pt->timer.expires); |