]> git.baikalelectronics.ru Git - kernel.git/commit
virt/coco/sev-guest: Simplify extended guest request handling
authorBorislav Petkov (AMD) <bp@alien8.de>
Wed, 15 Feb 2023 10:39:41 +0000 (11:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:34:05 +0000 (13:34 +0100)
commita73196a8b72bf492ed84e7684587661c14488a90
tree73d15fc59bc7ac8a6a5988e2a800a2c6c0d25218
parent68a23b0fa2e3688e162e8f1102e145c03ef1c26b
virt/coco/sev-guest: Simplify extended guest request handling

commit 5f3b250743c5bbf088f738f7794f3eec22746811 upstream.

Return a specific error code - -ENOSPC - to signal the too small cert
data buffer instead of checking exit code and exitinfo2.

While at it, hoist the *fw_err assignment in snp_issue_guest_request()
so that a proper error value is returned to the callers.

  [ Tom: check override_err instead of err. ]

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230307192449.24732-4-bp@alien8.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/sev.c
drivers/virt/coco/sev-guest/sev-guest.c