aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-03-23 06:12:11 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:33 -0400
commit78646121e9a2fcf7977cc15966420e572a450bc3 (patch)
tree55aeac260f4a43bef8e1bc1147f93a3f7e867ec7 /virt
parent09cec754885f900f6aab23801878c0cd217ee1d6 (diff)
KVM: Fix interrupt unhalting a vcpu when it shouldn't
kvm_vcpu_block() unhalts vpu on an interrupt/timer without checking if interrupt window is actually opened. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index a1a4272fa57c..63d5fa2bc84a 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1610,7 +1610,8 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
1610 for (;;) { 1610 for (;;) {
1611 prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE); 1611 prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE);
1612 1612
1613 if (kvm_cpu_has_interrupt(vcpu) || 1613 if ((kvm_arch_interrupt_allowed(vcpu) &&
1614 kvm_cpu_has_interrupt(vcpu)) ||
1614 kvm_arch_vcpu_runnable(vcpu)) { 1615 kvm_arch_vcpu_runnable(vcpu)) {
1615 set_bit(KVM_REQ_UNHALT, &vcpu->requests); 1616 set_bit(KVM_REQ_UNHALT, &vcpu->requests);
1616 break; 1617 break;