Skip to content

Commit

Permalink
KVM: x86: fix lapic_timer_int_injected with APIC-v
Browse files Browse the repository at this point in the history
With APICv, LAPIC timer interrupt is always delivered via IRR:
apic_find_highest_irr syncs PIR to IRR.

Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
matosatti authored and bonzini committed Feb 2, 2015
1 parent ad15a29 commit f933986
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/x86/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,13 +1086,13 @@ static bool lapic_timer_int_injected(struct kvm_vcpu *vcpu)

if (kvm_apic_hw_enabled(apic)) {
int vec = reg & APIC_VECTOR_MASK;
void *bitmap = apic->regs + APIC_ISR;

if (kvm_x86_ops->test_posted_interrupt)
return kvm_x86_ops->test_posted_interrupt(vcpu, vec);
else {
if (apic_test_vector(vec, apic->regs + APIC_ISR))
return true;
}
if (kvm_x86_ops->deliver_posted_interrupt)
bitmap = apic->regs + APIC_IRR;

if (apic_test_vector(vec, bitmap))
return true;
}
return false;
}
Expand Down

0 comments on commit f933986

Please sign in to comment.