2016-10-14 20:21+0200, Paolo Bonzini: > Synchronizing PIR to IRR is not needed in most callers of > apic_find_highest_irr. Move it to the one place that matters, > interrupt acknowledgement. > > Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > --- Reviewed-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > @@ -1973,6 +1971,9 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu) > return -1; > > apic_update_ppr(apic); > + > + if (apic->vcpu->arch.apicv_active) > + kvm_x86_ops->sync_pir_to_irr(apic->vcpu); Btw. do all callers of kvm_apic_has_interrupt() need it? Thanks. > highest_irr = apic_find_highest_irr(apic); > if ((highest_irr == -1) || > ((highest_irr & 0xF0) <= kvm_lapic_get_reg(apic, APIC_PROCPRI))) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html