virt: Add SEV-SNP guest driver
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 7 Mar 2022 21:33:53 +0000 (15:33 -0600)
committerBorislav Petkov <bp@suse.de>
Thu, 7 Apr 2022 14:47:12 +0000 (16:47 +0200)
commitfce96cf0443083e37455eff8f78fd240c621dae3
treeb4dda957908136bde79329681531228f617c324e
parent3a45b3753849c4a12cca2dd176c0192cd2a63e62
virt: Add SEV-SNP guest driver

The SEV-SNP specification provides the guest a mechanism to communicate
with the PSP without risk from a malicious hypervisor who wishes to
read, alter, drop or replay the messages sent. The driver uses
snp_issue_guest_request() to issue GHCB SNP_GUEST_REQUEST or
SNP_EXT_GUEST_REQUEST NAE events to submit the request to PSP.

The PSP requires that all communication should be encrypted using key
specified through a struct snp_guest_platform_data descriptor.

Userspace can use SNP_GET_REPORT ioctl() to query the guest attestation
report.

See SEV-SNP spec section Guest Messages for more details.

  [ bp: Remove the "what" from the commit message, massage. ]

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220307213356.2797205-44-brijesh.singh@amd.com
Documentation/virt/coco/sevguest.rst [new file with mode: 0644]
Documentation/virt/index.rst
drivers/virt/Kconfig
drivers/virt/Makefile
drivers/virt/coco/sevguest/Kconfig [new file with mode: 0644]
drivers/virt/coco/sevguest/Makefile [new file with mode: 0644]
drivers/virt/coco/sevguest/sevguest.c [new file with mode: 0644]
drivers/virt/coco/sevguest/sevguest.h [new file with mode: 0644]
include/uapi/linux/sev-guest.h [new file with mode: 0644]