KVM: x86: allow RSM from 64-bit mode
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 Nov 2015 12:43:05 +0000 (13:43 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Nov 2015 15:24:38 +0000 (16:24 +0100)
commit89651a3decbe03754f304a0b248f27eeb9a37937
tree9a97a14cb71b3695b8da048829bddfa3ad5d2dee
parent656ec4a4928a3db7d16e5cb9bce351a478cfd3d5
KVM: x86: allow RSM from 64-bit mode

The SDM says that exiting system management mode from 64-bit mode
is invalid, but that would be too good to be true.  But actually,
most of the code is already there to support exiting from compat
mode (EFER.LME=1, EFER.LMA=0).  Getting all the way from 64-bit
mode to real mode only requires clearing CS.L and CR4.PCIDE.

Cc: stable@vger.kernel.org
Fixes: 660a5d517aaab9187f93854425c4c63f4a09195c
Tested-by: Laszlo Ersek <lersek@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c