KVM: x86: ignore APICv if LAPIC is not enabled
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Nov 2021 12:35:44 +0000 (07:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:43 +0000 (09:04 +0100)
commit3a929e1d7e5e0e0fbdbe0dc9ee04638745965108
tree626d8856efe3024d8d6a88baa499d8ef38d168f0
parentcbe4fcf37150a409ab1bfc59be0cb3408ab22236
KVM: x86: ignore APICv if LAPIC is not enabled

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