OSDN Git Service

KVM: x86: Fix immediate_exit handling for uninitialized AP
authorJan H. Schönherr <jschoenh@amazon.de>
Wed, 6 Sep 2017 16:34:06 +0000 (18:34 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 13 Sep 2017 14:40:24 +0000 (16:40 +0200)
commit2f173d2688559a6f85643d38a2ad6f45eb420c42
treed01b370f149fcd13d0f8d75ed226cf5b32f7ed31
parenta05950009f50ca971a1d616655d01628177bd2e3
KVM: x86: Fix immediate_exit handling for uninitialized AP

When user space sets kvm_run->immediate_exit, KVM is supposed to
return quickly. However, when a vCPU is in KVM_MP_STATE_UNINITIALIZED,
the value is not considered and the vCPU blocks.

Fix that oversight.

Fixes: 460df4c1fc7c008 ("KVM: race-free exit from KVM_RUN without POSIX signals")
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/x86.c