summaryrefslogtreecommitdiff
path: root/include/uapi/linux/psp-sev.h
diff options
context:
space:
mode:
authorPeter Gonda <pgonda@google.com>2023-03-07 20:24:39 +0100
committerBorislav Petkov (AMD) <bp@alien8.de>2023-03-21 11:37:32 +0100
commitefb339a83368ab25de1a18c0fdff85e01c13a1ea (patch)
treed6a2d9ffeaefb71d5a1942020b71020a4ca1852f /include/uapi/linux/psp-sev.h
parente8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff)
crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL
The PSP can return a "firmware error" code of -1 in circumstances where the PSP has not actually been called. To make this protocol unambiguous, name the value SEV_RET_NO_FW_CALL. [ bp: Massage a bit. ] Signed-off-by: Peter Gonda <pgonda@google.com> Signed-off-by: Dionna Glaze <dionnaglaze@google.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20221207010210.2563293-2-dionnaglaze@google.com
Diffstat (limited to 'include/uapi/linux/psp-sev.h')
-rw-r--r--include/uapi/linux/psp-sev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h
index 91b4c63d5cbf..1c9da485318f 100644
--- a/include/uapi/linux/psp-sev.h
+++ b/include/uapi/linux/psp-sev.h
@@ -36,6 +36,13 @@ enum {
* SEV Firmware status code
*/
typedef enum {
+ /*
+ * This error code is not in the SEV spec. Its purpose is to convey that
+ * there was an error that prevented the SEV firmware from being called.
+ * The SEV API error codes are 16 bits, so the -1 value will not overlap
+ * with possible values from the specification.
+ */
+ SEV_RET_NO_FW_CALL = -1,
SEV_RET_SUCCESS = 0,
SEV_RET_INVALID_PLATFORM_STATE,
SEV_RET_INVALID_GUEST_STATE,