KVM: VMX: fix SMEP and SMAP without EPT
authorRadim Krčmář <rkrcmar@redhat.com>
Mon, 2 Nov 2015 21:20:00 +0000 (22:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:23:31 +0000 (11:23 -0800)
commit03e572f3dda7f5790930df631a3f013f4100558b
treecfc90e29f966ed536362d40cfb29bc2ad8f52456
parentc12a3752a390994ad5e3b987f123ffe24143ad48
KVM: VMX: fix SMEP and SMAP without EPT

commit 656ec4a4928a3db7d16e5cb9bce351a478cfd3d5 upstream.

The comment in code had it mostly right, but we enable paging for
emulated real mode regardless of EPT.

Without EPT (which implies emulated real mode), secondary VCPUs won't
start unless we disable SM[AE]P when the guest doesn't use paging.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx.c