summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-12-18 15:54:58 +0300
committerRadim Krčmář <rkrcmar@redhat.com>2017-01-09 16:48:02 +0300
commit26fbbee5815e9352187ac18f0aa53534f62567ff (patch)
tree7359959ae8e805fdbdd5b2b3ae8c8b33c8bd438d /arch/x86/kvm/lapic.c
parentb3c045d33218fe291b04d30e24b6eab0431987e6 (diff)
downloadlinux-26fbbee5815e9352187ac18f0aa53534f62567ff.tar.xz
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 <rkagan@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c3
1 files changed, 2 insertions, 1 deletions
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);
}