]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SEV: Return appropriate error codes if SEV-ES scratch setup fails
authorSean Christopherson <seanjc@google.com>
Tue, 9 Nov 2021 22:23:49 +0000 (22:23 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 5 Dec 2021 08:02:03 +0000 (03:02 -0500)
commitace41530380732c137d56201395734cbb4dfd7bf
treecd975d129d4ce75408f5e5394815eeb674fb6895
parent8257a7264b3810fffe46936e1eb34785bf7a8566
KVM: SEV: Return appropriate error codes if SEV-ES scratch setup fails

Return appropriate error codes if setting up the GHCB scratch area for an
SEV-ES guest fails.  In particular, returning -EINVAL instead of -ENOMEM
when allocating the kernel buffer could be confusing as userspace would
likely suspect a guest issue.

Fixes: 38454143baff ("KVM: SVM: Support MMIO for an SEV-ES guest")
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211109222350.2266045-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c