diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-03-23 12:12:11 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 11:48:33 +0300 |
commit | 78646121e9a2fcf7977cc15966420e572a450bc3 (patch) | |
tree | 55aeac260f4a43bef8e1bc1147f93a3f7e867ec7 /virt | |
parent | 09cec754885f900f6aab23801878c0cd217ee1d6 (diff) | |
download | linux-exynos-78646121e9a2fcf7977cc15966420e572a450bc3.tar.gz linux-exynos-78646121e9a2fcf7977cc15966420e572a450bc3.tar.bz2 linux-exynos-78646121e9a2fcf7977cc15966420e572a450bc3.zip |
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.c | 3 |
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) for (;;) { prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE); - if (kvm_cpu_has_interrupt(vcpu) || + if ((kvm_arch_interrupt_allowed(vcpu) && + kvm_cpu_has_interrupt(vcpu)) || kvm_arch_vcpu_runnable(vcpu)) { set_bit(KVM_REQ_UNHALT, &vcpu->requests); break; |