lkml.org 
[lkml]   [2021]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 074/207] KVM: x86: ignore APICv if LAPIC is not enabled
    Date
    From: Paolo Bonzini <pbonzini@redhat.com>

    commit 78311a514099932cd8434d5d2194aa94e56ab67c upstream.

    Synchronize the two calls to kvm_x86_sync_pir_to_irr. The one
    in the reenter-guest fast path invoked the callback unconditionally
    even if LAPIC is present but disabled. In this case, there are
    no interrupts to deliver, and therefore posted interrupts can
    be ignored.

    Cc: stable@vger.kernel.org
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    arch/x86/kvm/x86.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/x86/kvm/x86.c
    +++ b/arch/x86/kvm/x86.c
    @@ -9723,7 +9723,7 @@ static int vcpu_enter_guest(struct kvm_v
    if (likely(exit_fastpath != EXIT_FASTPATH_REENTER_GUEST))
    break;

    - if (vcpu->arch.apicv_active)
    + if (kvm_lapic_enabled(vcpu) && vcpu->arch.apicv_active)
    static_call(kvm_x86_sync_pir_to_irr)(vcpu);

    if (unlikely(kvm_vcpu_exit_request(vcpu))) {

    \
     
     \ /
      Last update: 2021-12-06 17:11    [W:4.007 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site