]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: fix user triggerable warning in kvm_apic_accept_events()
authorDavid Hildenbrand <david@redhat.com>
Thu, 23 Mar 2017 10:46:03 +0000 (11:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:30:57 +0000 (14:30 +0200)
commit74cbcb5afa75cab817b4c9fc42bdfadb15500e7b
treefed037167878f723eef205a0724ba839ef7137e9
parentf22d13c45f2d607b58a867a7e8c3d6fefd9385bd
KVM: x86: fix user triggerable warning in kvm_apic_accept_events()

commit 28bf28887976d8881a3a59491896c718fade7355 upstream.

If we already entered/are about to enter SMM, don't allow switching to
INIT/SIPI_RECEIVED, otherwise the next call to kvm_apic_accept_events()
will report a warning.

Same applies if we are already in MP state INIT_RECEIVED and SMM is
requested to be turned on. Refuse to set the VCPU events in this case.

Fixes: cd7764fe9f73 ("KVM: x86: latch INITs while in system management mode")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c