summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/sp-dev.h
diff options
context:
space:
mode:
authorBrijesh Singh2017-12-04 17:57:28 +0100
committerBrijesh Singh2017-12-04 17:57:28 +0100
commit200664d5237f3f8cd2a2f9f5c5dea08502336bd1 (patch)
tree2dc118d62b71285a84640e74bd7775864425cd2f /drivers/crypto/ccp/sp-dev.h
parentcrypto: ccp: Add Platform Security Processor (PSP) device support (diff)
downloadkernel-qcow2-linux-200664d5237f3f8cd2a2f9f5c5dea08502336bd1.tar.gz
kernel-qcow2-linux-200664d5237f3f8cd2a2f9f5c5dea08502336bd1.tar.xz
kernel-qcow2-linux-200664d5237f3f8cd2a2f9f5c5dea08502336bd1.zip
crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support
AMD's new Secure Encrypted Virtualization (SEV) feature allows the memory contents of virtual machines to be transparently encrypted with a key unique to the VM. The programming and management of the encryption keys are handled by the AMD Secure Processor (AMD-SP) which exposes the commands for these tasks. The complete spec is available at: http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Extend the AMD-SP driver to provide the following support: - an in-kernel API to communicate with the SEV firmware. The API can be used by the hypervisor to create encryption context for a SEV guest. - a userspace IOCTL to manage the platform certificates. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Borislav Petkov <bp@suse.de> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Gary Hook <gary.hook@amd.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: linux-crypto@vger.kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Improvements-by: Borislav Petkov <bp@suse.de> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'drivers/crypto/ccp/sp-dev.h')
-rw-r--r--drivers/crypto/ccp/sp-dev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/sp-dev.h b/drivers/crypto/ccp/sp-dev.h
index 909cf3e436b4..acb197b66ced 100644
--- a/drivers/crypto/ccp/sp-dev.h
+++ b/drivers/crypto/ccp/sp-dev.h
@@ -143,12 +143,16 @@ static inline int ccp_dev_resume(struct sp_device *sp)
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
int psp_dev_init(struct sp_device *sp);
+void psp_pci_init(void);
void psp_dev_destroy(struct sp_device *sp);
+void psp_pci_exit(void);
#else /* !CONFIG_CRYPTO_DEV_SP_PSP */
static inline int psp_dev_init(struct sp_device *sp) { return 0; }
+static inline void psp_pci_init(void) { }
static inline void psp_dev_destroy(struct sp_device *sp) { }
+static inline void psp_pci_exit(void) { }
#endif /* CONFIG_CRYPTO_DEV_SP_PSP */