diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index cade703d6edbe6158ed7293f31d839031aa896d9..19d1c9707fb726304d5d5a31808ef8cd0b959371 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -2010,6 +2010,13 @@ static int shutdown_interception(struct vcpu_svm *svm) { struct kvm_run *kvm_run = svm->vcpu.run; + /* + * The VM save area has already been encrypted so it + * cannot be reinitialized - just terminate. + */ + if (sev_es_guest(svm->vcpu.kvm)) + return -EINVAL; + /* * VMCB is undefined after a SHUTDOWN intercept * so reinitialize it.