KVM: x86: WARN if KVM emulates an IPI without clearing the BUSY flag
authorSean Christopherson <seanjc@google.com>
Fri, 4 Feb 2022 21:42:00 +0000 (21:42 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Mar 2022 13:50:47 +0000 (08:50 -0500)
commitbd17f417c07d4e1cbc85d7b69cd663725d12e8d6
tree0072dc9cc06d1eee763808581765673a8b2ddbe4
parentb51818afdc1d3c7cc269e295953685558d3af71c
KVM: x86: WARN if KVM emulates an IPI without clearing the BUSY flag

WARN if KVM emulates an IPI without clearing the BUSY flag, failure to do
so could hang the guest if it waits for the IPI be sent.

Opportunistically use APIC_ICR_BUSY macro instead of open coding the
magic number, and add a comment to clarify why kvm_recalculate_apic_map()
is unconditionally invoked (it's really, really confusing for IPIs due to
the existence of fast paths that don't trigger a potential recalc).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220204214205.3306634-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/x86.c