提交 f9339860 编写于 作者: M Marcelo Tosatti 提交者: Paolo Bonzini

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: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 ad15a296
......@@ -1086,14 +1086,14 @@ 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))
if (kvm_x86_ops->deliver_posted_interrupt)
bitmap = apic->regs + APIC_IRR;
if (apic_test_vector(vec, bitmap))
return true;
}
}
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册