Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [Patch v2 0/4] i386/sev: SMT Protection for SEV-SNP guests
@ 2026-12-05 21:39 Pratik R. Sampat
  2026-12-05 21:39 ` [Patch v2 1/4] i386/sev: Introduce SMT Protection for SEV-SNP Pratik R. Sampat
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pratik R. Sampat @ 2026-12-05 21:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: kvm, michael.roth, thomas.lendacky, ashish.kalra, pbonzini,
	prsampat

SMT Protection (SMTP) protects an SEV-SNP guest on Zen 4+ systems from
sibling side channels by requiring that, while one of its vCPUs is in
guest mode, every SMT sibling thread on that physical core is HLT idle
in host mode.

Enhanced SMT Protection (ESMTP) is an SEV-SNP feature on Zen5+ systems
that lets a guest constrain what runs on the sibling thread of the core
its vCPUs execute on. Each vCPU's VMSA carries a VCPU_ID and a
VCPU_SIBLING_MASK, and hardware admits a VMRUN only when the sibling
thread is idle in host mode or is running a vCPU that the mask permits.

This series adds support to opt-in for [E]SMTP from KVM and engages core
scheduling onto the vCPUs to either mint new cookies for each vCPU for
SMTP or to bundle trusted siblings in one group for ESMTP.

Usage
-----
Requires patched Linux and edk2 builds. Launch an SEV-SNP guest with
[E]SMTP enabled on the sev-snp-guest object:

  -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,smtp=on

Or,

  -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,esmtp=on

SMTP and ESMTP are mutually exclusive.

Both SMTP and ESMTP are opt-in because they carry a performance cost as
VMRUN stalls until the sibling runs work from a trusted vCPU or is in
idle.

The guest reports the feature in dmesg among the SNP feature names:

  # dmesg | grep -i SEV
  ... SEV-SNP ... SMTProt ...
Or,
  ... SEV-SNP ... ESMTProt ...

v1..v2:
* Added in SMT protection to support older class EPYC systems
* Rebased with qemu master

v1: https://lore.kernel.org/kvm/cover.1794935627.git.prsampat@amd.com/

Pratik R. Sampat (4):
  i386/sev: Introduce SMT Protection for SEV-SNP
  i386/sev: Introduce Enhanced SMT Protection for SEV-SNP
  i386/sev: Add core scheduling for SMT Protection
  i386/sev: Add core scheduling for Enhanced SMT Protection

 qapi/qom.json     |  16 ++++++-
 target/i386/sev.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++
 target/i386/sev.h |   2 +
 3 files changed, 130 insertions(+), 1 deletion(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-12-05 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 21:39 [Patch v2 0/4] i386/sev: SMT Protection for SEV-SNP guests Pratik R. Sampat
2026-12-05 21:39 ` [Patch v2 1/4] i386/sev: Introduce SMT Protection for SEV-SNP Pratik R. Sampat
2026-12-05 21:39 ` [Patch v2 2/4] i386/sev: Introduce Enhanced " Pratik R. Sampat
2026-12-05 21:39 ` [Patch v2 3/4] i386/sev: Add core scheduling for SMT Protection Pratik R. Sampat
2026-12-05 21:39 ` [Patch v2 4/4] i386/sev: Add core scheduling for Enhanced " Pratik R. Sampat

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