crypto: ccp - Add support for SEV-ES to the PSP driver
authorTom Lendacky <thomas.lendacky@amd.com>
Tue, 21 Apr 2020 17:44:49 +0000 (12:44 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 Apr 2020 05:19:33 +0000 (15:19 +1000)
commit97f9ac3db6612f14ac0c509e1a63ce14fd4cc0eb
treeda529da36498fa04b6ffb14f8876818d305378a0
parent3c2214b6027ff37945799de717c417212e1a8c54
crypto: ccp - Add support for SEV-ES to the PSP driver

To provide support for SEV-ES, the hypervisor must provide an area of
memory to the PSP. Once this Trusted Memory Region (TMR) is provided to
the PSP, the contents of this area of memory are no longer available to
the x86.

Update the PSP driver to allocate a 1MB region for the TMR that is 1MB
aligned and then provide it to the PSP through the SEV INIT command.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/sev-dev.c
include/linux/psp-sev.h
include/uapi/linux/psp-sev.h