diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2015-02-02 12:26:08 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-02 12:36:25 -0500 |
commit | f9339860384aaa104d85f59b75921941b39a45fc (patch) | |
tree | d9ce4990dc0a00af09a581c2cf1ed7c66807663a | |
parent | ad15a296471d40703be647b11ddc56df0f1c0cdd (diff) |
KVM: x86: fix lapic_timer_int_injected with APIC-v
With APICv, LAPIC timer interrupt is always delivered via IRR:
apic_find_highest_irr syncs PIR to IRR.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/lapic.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 555956c3c473..3481e9eee8f4 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1086,13 +1086,13 @@ static bool lapic_timer_int_injected(struct kvm_vcpu *vcpu) | |||
1086 | 1086 | ||
1087 | if (kvm_apic_hw_enabled(apic)) { | 1087 | if (kvm_apic_hw_enabled(apic)) { |
1088 | int vec = reg & APIC_VECTOR_MASK; | 1088 | int vec = reg & APIC_VECTOR_MASK; |
1089 | void *bitmap = apic->regs + APIC_ISR; | ||
1089 | 1090 | ||
1090 | if (kvm_x86_ops->test_posted_interrupt) | 1091 | if (kvm_x86_ops->deliver_posted_interrupt) |
1091 | return kvm_x86_ops->test_posted_interrupt(vcpu, vec); | 1092 | bitmap = apic->regs + APIC_IRR; |
1092 | else { | 1093 | |
1093 | if (apic_test_vector(vec, apic->regs + APIC_ISR)) | 1094 | if (apic_test_vector(vec, bitmap)) |
1094 | return true; | 1095 | return true; |
1095 | } | ||
1096 | } | 1096 | } |
1097 | return false; | 1097 | return false; |
1098 | } | 1098 | } |