linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add SEV-ES hypervisor support for GHCB protocol version 2
@ 2024-05-01  7:10 Michael Roth
  2024-05-01  7:10 ` [PATCH 1/4] KVM: SEV: Add support to handle AP reset MSR protocol Michael Roth
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michael Roth @ 2024-05-01  7:10 UTC (permalink / raw)
  To: kvm
  Cc: linux-coco, linux-mm, linux-crypto, x86, linux-kernel, jroedel,
	thomas.lendacky, pbonzini, seanjc, pgonda, ashish.kalra,
	nikunj.dadhania, pankaj.gupta

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(-)




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-01  7:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01  7:10 [PATCH 0/4] Add SEV-ES hypervisor support for GHCB protocol version 2 Michael Roth
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox