virt: sevguest: Add support to get extended report
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 7 Mar 2022 21:33:55 +0000 (15:33 -0600)
committerBorislav Petkov <bp@suse.de>
Thu, 7 Apr 2022 14:47:12 +0000 (16:47 +0200)
commitd80b494f712317493d464a55652698c4d1b7bb0f
tree72a1ef636877237cf66e86ea3f0bf38524b6d9e3
parent68de0b2f938642079c0c853b219bdb88c4dc4d13
virt: sevguest: Add support to get extended report

Version 2 of GHCB specification defines Non-Automatic-Exit (NAE) to get
extended guest report which is similar to the SNP_GET_REPORT ioctl. The
main difference is related to the additional data that will be returned.

That additional data returned is a certificate blob that can be used by
the SNP guest user. The certificate blob layout is defined in the GHCB
specification. The driver simply treats the blob as a opaque data and
copies it to userspace.

  [ bp: Massage commit message, cast 1st arg of access_ok() ]

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-46-brijesh.singh@amd.com
Documentation/virt/coco/sevguest.rst
drivers/virt/coco/sevguest/sevguest.c
include/uapi/linux/sev-guest.h