lkml.org 
[lkml]   [2016]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] KVM: x86: remove unnecessary sync_pir_to_irr
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@redhat.com>
> ---

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

> 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)))

\
 
 \ /
  Last update: 2016-10-26 22:29    [W:0.162 / U:2.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site