summary refs log tree commit diff
path: root/arch/x86/kvm/svm/svm.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-05-18 13:08:37 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-01 04:26:03 -0400
commitc513f484c5582a8efadf3d72298e2285b041536e (patch)
treeb8450accf8e427bb6e7ceaa9c4711bae0bc2d6c9 /arch/x86/kvm/svm/svm.h
parentca46d739e3caf44dcd3db9eb8da30d0ff3aa9180 (diff)
downloadlinux-c513f484c5582a8efadf3d72298e2285b041536e.tar.gz
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>
Diffstat (limited to 'arch/x86/kvm/svm/svm.h')
-rw-r--r--arch/x86/kvm/svm/svm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index be8e830f83fa..6ac4c00a5d82 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -389,6 +389,7 @@ static inline bool nested_exit_on_nmi(struct vcpu_svm *svm)
 
 void enter_svm_guest_mode(struct vcpu_svm *svm, u64 vmcb_gpa,
 			  struct vmcb *nested_vmcb);
+void svm_leave_nested(struct vcpu_svm *svm);
 int nested_svm_vmrun(struct vcpu_svm *svm);
 void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
 int nested_svm_vmexit(struct vcpu_svm *svm);