qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] KVM: SEV: Add support for the ALLOWED_SEV_FEATURES feature
@ 2025-02-07 23:34 Kim Phillips
  2025-02-07 23:34 ` [PATCH v3 1/2] x86/cpufeatures: Add "Allowed SEV Features" Feature Kim Phillips
  2025-02-07 23:34 ` [PATCH v3 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field Kim Phillips
  0 siblings, 2 replies; 13+ messages in thread
From: Kim Phillips @ 2025-02-07 23:34 UTC (permalink / raw)
  To: qemu-devel, kvm
  Cc: Tom Lendacky, Michael Roth, Ashish Kalra, Nikunj A . Dadhania,
	Borislav Petkov, Dave Hansen, Sean Christopherson, Paolo Bonzini,
	Kim Phillips

AMD EPYC 5th generation processors have introduced a feature that allows
the hypervisor to control the SEV_FEATURES that are set for, or by, a
guest [1].  ALLOWED_SEV_FEATURES can be used by the hypervisor to enforce
that SEV-ES and SEV-SNP guests cannot enable features that the
hypervisor does not want to be enabled.

Patch 1/2 adds support to detect the feature.

Patch 2/2 configures the ALLOWED_SEV_FEATURES field in the VMCB
according to the features the hypervisor supports.

[1] Section 15.36.20 "Allowed SEV Features", AMD64 Architecture
    Programmer's Manual, Pub. 24593 Rev. 3.42 - March 2024:
    https://bugzilla.kernel.org/attachment.cgi?id=306250

Based on 6.14-rc1.

v3:
 - Assign allowed_sev_features based on user-provided vmsa_features mask (Sean)
 - Users now have to explicitly opt-in with a qemu "allowed-sev-features=on" switch.
 - Rebased on top of 6.14-rc1 and reworked authorship chain (tglx)

v2: https://lore.kernel.org/lkml/20240822221938.2192109-1-kim.phillips@amd.com/
 - Added some SEV_FEATURES require to be explicitly allowed by
   ALLOWED_SEV_FEATURES wording (Sean).
 - Added Nikunj's Reviewed-by.

v1: https://lore.kernel.org/lkml/20240802015732.3192877-3-kim.phillips@amd.com/

Kim Phillips (1):
  KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field

Kishon Vijay Abraham I (1):
  x86/cpufeatures: Add "Allowed SEV Features" Feature

 arch/x86/include/asm/cpufeatures.h |  1 +
 arch/x86/include/asm/svm.h         |  5 ++++-
 arch/x86/kvm/svm/sev.c             | 17 +++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-02-18 18:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 23:34 [PATCH v3 0/2] KVM: SEV: Add support for the ALLOWED_SEV_FEATURES feature Kim Phillips
2025-02-07 23:34 ` [PATCH v3 1/2] x86/cpufeatures: Add "Allowed SEV Features" Feature Kim Phillips
2025-02-10 17:20   ` Tom Lendacky
2025-02-07 23:34 ` [PATCH v3 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field Kim Phillips
2025-02-10 18:08   ` Tom Lendacky
2025-02-11 21:46     ` Sean Christopherson
2025-02-13 23:03       ` Kim Phillips
2025-02-14  0:55         ` Sean Christopherson
2025-02-14 21:59           ` Kim Phillips
2025-02-18 17:07             ` Sean Christopherson
2025-02-17  6:43           ` Naveen N Rao
2025-02-18 16:38             ` Sean Christopherson
2025-02-18 18:33             ` Sean Christopherson

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 NNTP newsgroup(s).