From: Liam Merwick <liam.merwick@oracle.com>
To: Melody Wang <huibo.wang@amd.com>, kvm@vger.kernel.org
Cc: linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
roedel@suse.de, Tom Lendacky <thomas.lendacky@amd.com>,
ashish.kalra@amd.com, pankaj.gupta@amd.com,
dionnaglaze@google.com, Michael Roth <michael.roth@amd.com>
Subject: Re: [PATCH v4 1/1] KVM: Introduce KVM_EXIT_SNP_REQ_CERTS for SNP certificate-fetching
Date: Tue, 21 Jan 2025 20:18:55 +0000 [thread overview]
Message-ID: <cd8f0c33-1f26-48a5-a3d4-1d4ad4192160@oracle.com> (raw)
In-Reply-To: <20250120215818.522175-2-huibo.wang@amd.com>
On 20/01/2025 21:58, Melody Wang wrote:
> From: Michael Roth <michael.roth@amd.com>
>
> For SEV-SNP, the host can optionally provide a certificate table to the
> guest when it issues an attestation request to firmware (see GHCB 2.0
> specification regarding "SNP Extended Guest Requests"). This certificate
> table can then be used to verify the endorsement key used by firmware to
> sign the attestation report.
>
> While it is possible for guests to obtain the certificates through other
> means, handling it via the host provides more flexibility in being able
> to keep the certificate data in sync with the endorsement key throughout
> host-side operations that might resulting in the endorsement key
> changing.
>
> In the case of KVM, userspace will be responsible for fetching the
> certificate table and keeping it in sync with any modifications to the
> endorsement key by other userspace management tools. Define a new
> KVM_EXIT_SNP_REQ_CERTS event where userspace is provided with the GPA of
> the buffer the guest has provided as part of the attestation request so
> that userspace can write the certificate data into it while relying on
> filesystem-based locking to keep the certificates up-to-date relative to
> the endorsement keys installed/utilized by firmware at the time the
> certificates are fetched.
>
> Also introduce a KVM_CAP_EXIT_SNP_REQ_CERTS capability to enable/disable
> the exit for cases where userspace does not support
> certificate-fetching, in which case KVM will fall back to returning an
> empty certificate table if the guest provides a buffer for it.
>
> [Melody: Update the documentation scheme about how file locking is
> expected to happen.]
>
> Signed-off-by: Michael Roth <michael.roth@amd.com>
> Signed-off-by: Melody Wang <huibo.wang@amd.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
> ---
> Documentation/virt/kvm/api.rst | 106 ++++++++++++++++++++++++++++++++
> arch/x86/include/asm/kvm_host.h | 1 +
> arch/x86/kvm/svm/sev.c | 43 +++++++++++--
> arch/x86/kvm/x86.c | 11 ++++
> include/uapi/linux/kvm.h | 10 +++
> include/uapi/linux/sev-guest.h | 8 +++
> 6 files changed, 173 insertions(+), 6 deletions(-)
>
prev parent reply other threads:[~2025-01-21 20:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 21:58 [PATCH v4 0/1] SEV-SNP: Add KVM support for SNP certificate fetching Melody Wang
2025-01-20 21:58 ` [PATCH v4 1/1] KVM: Introduce KVM_EXIT_SNP_REQ_CERTS for SNP certificate-fetching Melody Wang
2025-01-21 15:55 ` Dionna Amalie Glaze
2025-01-21 16:52 ` Sean Christopherson
2025-01-21 17:19 ` Dionna Amalie Glaze
2025-02-19 17:36 ` Michael Roth
2025-01-21 20:18 ` Liam Merwick [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd8f0c33-1f26-48a5-a3d4-1d4ad4192160@oracle.com \
--to=liam.merwick@oracle.com \
--cc=ashish.kalra@amd.com \
--cc=dionnaglaze@google.com \
--cc=huibo.wang@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pankaj.gupta@amd.com \
--cc=pbonzini@redhat.com \
--cc=roedel@suse.de \
--cc=seanjc@google.com \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®