Add SEV-ES hypervisor support for GHCB protocol version 2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: SEV: Add support to handle AP reset MSR protocolarch/ arch/ arch/ | +53 | 0 replies | |
| 2/4 | KVM: SEV: Add GHCB handling for Hypervisor Feature Support requestsarch/ arch/ | +16 | 0 replies | |
| 3/4 | KVM: SEV: Add GHCB handling for termination requestsarch/ | +9 | 0 replies | |
| 4/4 | KVM: SEV: Allow per-guest configuration of GHCB protocol versionDocumentation/ arch/ arch/ +1 more | +42 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Add SEV-ES hypervisor support for GHCB protocol version 2
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/[email protected]/
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(-)