Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172282
b: refs/heads/master
c: 7fcdb51
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Dec 3, 2009
1 parent 0317b02 commit 25ad25d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfc33beaed3ecf0f92612dc7fb7095029ae7722e
refs/heads/master: 7fcdb5103d10d2eb75876637a2efa9679cce14d3
16 changes: 12 additions & 4 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2472,10 +2472,18 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct vmcb *vmcb = svm->vmcb;
return (vmcb->save.rflags & X86_EFLAGS_IF) &&
!(vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) &&
gif_set(svm) &&
!(is_nested(svm) && (svm->vcpu.arch.hflags & HF_VINTR_MASK));
int ret;

if (!gif_set(svm) ||
(vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK))
return 0;

ret = !!(vmcb->save.rflags & X86_EFLAGS_IF);

if (is_nested(svm))
return ret && !(svm->vcpu.arch.hflags & HF_VINTR_MASK);

return ret;
}

static void enable_irq_window(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit 25ad25d

Please sign in to comment.