Re: [PATCH Part1 v5 38/38] virt: sevguest: Add support to get extended report

Dov Murik
2021-08-31T20:23:15Z

Hi Brijesh,

On 20/08/2021 18:19, Brijesh Singh wrote:
> Version 2 of GHCB specification defines NAE to get the extended guest
> request. It is similar to the SNP_GET_REPORT ioctl. The main difference
> is related to the additional data that be returned. The additional
> data returned is a certificate blob that can be used by the SNP guest
> user.

It seems like the SNP_GET_EXT_REPORT ioctl does everything that the
SNP_GET_REPORT ioctl does, and more. Why expose SNP_GET_REPORT to
userspace at all?

-Dov

> 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.
>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
> Documentation/virt/coco/sevguest.rst | 22 +++++
> drivers/virt/coco/sevguest/sevguest.c | 126 ++++++++++++++++++++++++++
> include/uapi/linux/sev-guest.h | 13 +++
> 3 files changed, 161 insertions(+)
> …