]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: ccp - Fix uAPI definitions of PSP errors
authorDionna Glaze <dionnaglaze@google.com>
Sat, 8 Mar 2025 01:10:28 +0000 (12:10 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 15 Mar 2025 08:21:22 +0000 (16:21 +0800)
Additions to the error enum after explicit 0x27 setting for
SEV_RET_INVALID_KEY leads to incorrect value assignments.

Use explicit values to match the manufacturer specifications more
clearly.

Fixes: 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands")
CC: stable@vger.kernel.org
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/uapi/linux/psp-sev.h

index 832c15d9155bdbb95827c3e8214da066efe0f55e..eeb20dfb1fdaa420ca99dc0b4c0ccf08b8882a1d 100644 (file)
@@ -73,13 +73,20 @@ typedef enum {
        SEV_RET_INVALID_PARAM,
        SEV_RET_RESOURCE_LIMIT,
        SEV_RET_SECURE_DATA_INVALID,
-       SEV_RET_INVALID_KEY = 0x27,
-       SEV_RET_INVALID_PAGE_SIZE,
-       SEV_RET_INVALID_PAGE_STATE,
-       SEV_RET_INVALID_MDATA_ENTRY,
-       SEV_RET_INVALID_PAGE_OWNER,
-       SEV_RET_INVALID_PAGE_AEAD_OFLOW,
-       SEV_RET_RMP_INIT_REQUIRED,
+       SEV_RET_INVALID_PAGE_SIZE          = 0x0019,
+       SEV_RET_INVALID_PAGE_STATE         = 0x001A,
+       SEV_RET_INVALID_MDATA_ENTRY        = 0x001B,
+       SEV_RET_INVALID_PAGE_OWNER         = 0x001C,
+       SEV_RET_AEAD_OFLOW                 = 0x001D,
+       SEV_RET_EXIT_RING_BUFFER           = 0x001F,
+       SEV_RET_RMP_INIT_REQUIRED          = 0x0020,
+       SEV_RET_BAD_SVN                    = 0x0021,
+       SEV_RET_BAD_VERSION                = 0x0022,
+       SEV_RET_SHUTDOWN_REQUIRED          = 0x0023,
+       SEV_RET_UPDATE_FAILED              = 0x0024,
+       SEV_RET_RESTORE_REQUIRED           = 0x0025,
+       SEV_RET_RMP_INITIALIZATION_FAILED  = 0x0026,
+       SEV_RET_INVALID_KEY                = 0x0027,
        SEV_RET_MAX,
 } sev_ret_code;