Skip to contentSkip to conversation

crypto: ccp - Log when resetting PSP SEV state

PATCH In review Peter Gonda 2 participants 2 messages Apr 13, 2022 – Apr 21, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: ccp - Log when resetting PSP SEV state

Currently when the PSP returns a SECURE_DATA_INVALID error on INIT or INIT_EX the driver retries the command once which should reset the PSP's state SEV related state, meaning the PSP will regenerate its keying material. This is logged with a dbg log but given this will change system state this should be logged at a higher priority and with more information.

Cc Tom Lendacky <[email protected]>
Cc Brijesh Singh <[email protected]>
Cc David Rientjes <[email protected]>
Cc Herbert Xu <[email protected]>
Cc John Allen <[email protected]>
---
 drivers/crypto/ccp/sev-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/ccp/sev-dev.c +1 -1
index 6ab93dfd478a..fd928199bf1e 100644
@@ -435,7 +435,7 @@ static int __sev_platform_init_locked(int *error)
 		 * initialization function should succeed by replacing the state
 		 * with a reset state.
 		 */
-		dev_dbg(sev->dev, "SEV: retrying INIT command");
+		dev_err(sev->dev, "SEV: retrying INIT command because of SECURE_DATA_INVALID error. Retrying once to reset PSP SEV state.");
 		rc = init_function(&psp_ret);
 	}
 	if (error)
Signature · 1 line
2.35.1.1178.g4f1659d476-goog
maintainer
#1 lore raw
Quoted 15 lines · Peter Gonda

Currently when the PSP returns a SECURE_DATA_INVALID error on INIT or INIT_EX the driver retries the command once which should reset the PSP's state SEV related state, meaning the PSP will regenerate its keying material. This is logged with a dbg log but given this will change system state this should be logged at a higher priority and with more information.

Cc Tom Lendacky <[email protected]>
Cc Brijesh Singh <[email protected]>
Cc David Rientjes <[email protected]>
Cc Herbert Xu <[email protected]>
Cc John Allen <[email protected]>
Quoted 3 lines
---
 drivers/crypto/ccp/sev-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt