Skip to content

Commit

Permalink
KVM: SVM: check for nested VINTR flag in svm_interrupt_allowed
Browse files Browse the repository at this point in the history
Not checking for this flag breaks any nested hypervisor that does not
set VINTR. So fix it with this patch.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Sep 10, 2009
1 parent 2666695 commit 108768d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu)
return (vmcb->save.rflags & X86_EFLAGS_IF) &&
!(vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) &&
gif_set(svm) &&
!is_nested(svm);
!(is_nested(svm) && (svm->vcpu.arch.hflags & HF_VINTR_MASK));
}

static void enable_irq_window(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit 108768d

Please sign in to comment.