Re: [PATCH] crypto: ccp: shutdown SEV firmware on kexec

From: Herbert Xu
Date: Fri Aug 06 2021 - 08:14:52 EST


On Wed, Jul 28, 2021 at 10:15:21AM -0500, Brijesh Singh wrote:
> The commit 97f9ac3db6612 ("crypto: ccp - Add support for SEV-ES to the
> PSP driver") added support to allocate Trusted Memory Region (TMR)
> used during the SEV-ES firmware initialization. The TMR gets locked
> during the firmware initialization and unlocked during the shutdown.
> While the TMR is locked, access to it is disallowed.
>
> Currently, the CCP driver does not shutdown the firmware during the
> kexec reboot, leaving the TMR memory locked.
>
> Register a callback to shutdown the SEV firmware on the kexec boot.
>
> Fixes: 97f9ac3db6612 ("crypto: ccp - Add support for SEV-ES to the PSP driver")
> Reported-by: Lucas Nussbaum <lucas.nussbaum@xxxxxxxx>
> Tested-by: Lucas Nussbaum <lucas.nussbaum@xxxxxxxx>
> Cc: <stable@xxxxxxxxxx>
> Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
> Cc: Joerg Roedel <jroedel@xxxxxxx>
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Signed-off-by: Brijesh Singh <brijesh.singh@xxxxxxx>
> ---
> drivers/crypto/ccp/sev-dev.c | 49 +++++++++++++++++-------------------
> drivers/crypto/ccp/sp-pci.c | 12 +++++++++
> 2 files changed, 35 insertions(+), 26 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt