From: Michael Roth <michael.roth@amd.com>
To: <kvm@vger.kernel.org>
Cc: <linux-coco@lists.linux.dev>, <linux-mm@kvack.org>,
<linux-crypto@vger.kernel.org>, <x86@kernel.org>,
<linux-kernel@vger.kernel.org>, <jroedel@suse.de>,
<thomas.lendacky@amd.com>, <pbonzini@redhat.com>,
<seanjc@google.com>, <pgonda@google.com>, <ashish.kalra@amd.com>,
<nikunj.dadhania@amd.com>, <pankaj.gupta@amd.com>
Subject: [PATCH 0/4] Add SEV-ES hypervisor support for GHCB protocol version 2
Date: Wed, 1 May 2024 02:10:44 -0500 [thread overview]
Message-ID: <20240501071048.2208265-1-michael.roth@amd.com> (raw)
This patchset is also available at:
https://github.com/amdese/linux/commits/sev-init2-ghcb-v1
and is based on commit 20cc50a0410f (just before the v13 SNP patches) from:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/log/?h=kvm-coco-queue
Overview
--------
While the main additions from GHCB protocol version 1 to version 2 revolve
mostly around SEV-SNP support, there are a number of changes applicable to
SEV-ES guests as well. This series plucks a handful patches from the SNP
hypervisor patchset that comprise the total set of GHCB-related changes that
are also applicable to SEV-ES, and then introduces a KVM_SEV_INIT2 field so
that userspace can control the maximum GHCB protocol version advertised to
guests to help manage compatibility across kernels/versions.
For more background discussion, see:
https://lore.kernel.org/kvm/ZimnngU7hn7sKoSc@google.com/
Patch Layout
------------
01-03: These patches add support for all version 2 GHCB requests that
are applicable to SEV-ES
04: This patch switches the KVM_SEV_INIT2 default to GHCB protocol
version 2, and extends it with a new parameter that userspace
can use to control the specific GHCB version for a guest
Testing
-------
For testing this via QEMU, use the following tree:
https://github.com/amdese/qemu/commits/snp-v4-wip3c
A basic command-line invocation for SEV-ES would be:
qemu-system-x86_64 -smp 32,maxcpus=255 -cpu EPYC-Milan-v2
-machine q35,confidential-guest-support=sev0
-object sev-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,ghcb-version=2
Feedback/review is very much appreciated.
-Mike
----------------------------------------------------------------
Brijesh Singh (1):
KVM: SEV: Add GHCB handling for Hypervisor Feature Support requests
Michael Roth (2):
KVM: SEV: Add GHCB handling for termination requests
KVM: SEV: Allow per-guest configuration of GHCB protocol version
Tom Lendacky (1):
KVM: SEV: Add support to handle AP reset MSR protocol
Documentation/virt/kvm/x86/amd-memory-encryption.rst | 11 ++++-
arch/x86/include/asm/sev-common.h | 8 +++-
arch/x86/include/uapi/asm/kvm.h | 4 +-
arch/x86/kvm/svm/sev.c | 111 ++++++++++++++++++++++++++++++++++++++++-----
arch/x86/kvm/svm/svm.h | 2 +
5 files changed, 120 insertions(+), 16 deletions(-)
next reply other threads:[~2024-05-01 7:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 7:10 Michael Roth [this message]
2024-05-01 7:10 ` [PATCH 1/4] KVM: SEV: Add support to handle AP reset MSR protocol Michael Roth
2024-05-01 7:10 ` [PATCH 2/4] KVM: SEV: Add GHCB handling for Hypervisor Feature Support requests Michael Roth
2024-05-01 7:10 ` [PATCH 3/4] KVM: SEV: Add GHCB handling for termination requests Michael Roth
2024-05-01 7:10 ` [PATCH 4/4] KVM: SEV: Allow per-guest configuration of GHCB protocol version Michael Roth
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=20240501071048.2208265-1-michael.roth@amd.com \
--to=michael.roth@amd.com \
--cc=ashish.kalra@amd.com \
--cc=jroedel@suse.de \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nikunj.dadhania@amd.com \
--cc=pankaj.gupta@amd.com \
--cc=pbonzini@redhat.com \
--cc=pgonda@google.com \
--cc=seanjc@google.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).