From: Paolo Bonzini Date: Sun, 18 Dec 2016 12:54:58 +0000 (+0100) Subject: KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on PPR update X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26fbbee5815e9352187ac18f0aa53534f62567ff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git KVM: lapic: do not set KVM_REQ_EVENT unnecessarily on PPR update On PPR update, we set KVM_REQ_EVENT unconditionally anytime PPR is lowered. But we can take into account IRR here already. Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index a878e33119a3..457fb206647d 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -607,7 +607,8 @@ static void apic_update_ppr(struct kvm_lapic *apic) { u32 ppr; - if (__apic_update_ppr(apic, &ppr)) + if (__apic_update_ppr(apic, &ppr) && + apic_has_interrupt_for_ppr(apic, ppr) != -1) kvm_make_request(KVM_REQ_EVENT, apic->vcpu); }