Commit 635b3cc6 authored by Peter Gonda's avatar Peter Gonda Committed by Greg Kroah-Hartman
Browse files

KVM: SVM: Update SEV-ES shutdown intercepts with more metadata



[ Upstream commit bc3d7c55 ]

Currently if an SEV-ES VM shuts down userspace sees KVM_RUN struct with
only errno=EINVAL. This is a very limited amount of information to debug
the situation. Instead return KVM_EXIT_SHUTDOWN to alert userspace the VM
is shutting down and is not usable any further.

Signed-off-by: default avatarPeter Gonda <pgonda@google.com>
Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Suggested-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20230907162449.1739785-1-pgonda@google.com


[sean: tweak changelog]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Stable-dep-of: a2620f89 ("KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2402a3ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment