KVM: nSVM: leave guest mode when clearing EFER.SVME
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 May 2020 17:08:37 +0000 (13:08 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:03 +0000 (04:26 -0400)
commitc513f484c5582a8efadf3d72298e2285b041536e
treeb8450accf8e427bb6e7ceaa9c4711bae0bc2d6c9
parentca46d739e3caf44dcd3db9eb8da30d0ff3aa9180
KVM: nSVM: leave guest mode when clearing EFER.SVME

According to the AMD manual, the effect of turning off EFER.SVME while a
guest is running is undefined.  We make it leave guest mode immediately,
similar to the effect of clearing the VMX bit in MSR_IA32_FEAT_CTL.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h