[PATCH 0/3 v2] x86/sev: Report MSR_AMD64_SEV in SYSFS

Jörg Rödel <[email protected]> Mon, 3 Aug 2026 14:58:24 +0200
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Joerg Roedel <[email protected]>

Hi,

Here is an updated version of my original patch to report
MSR_AMD64_SEV in SYSFS. The intention is to give user-space tooling a
way to access the MSR value without needing to expose all MSRs via
the msr.ko module.

The patches here are updated to address a Sashiko comment asking why
SEV_STATUS is only reported for SEV-SNP guests. The sev_status file is
now created for SEV and SEV-ES guests as well.

Please review.

Thanks,

	Joerg

Joerg Roedel (3):
  x86/coco: Add CC_ATTR_GUEST_SEV
  x86/sev: Create /sys/devices/system/cpu/sev/ for all SEV guests
  x86/coco/sev: Make SEV_STATUS available via SYSFS

 .../ABI/testing/sysfs-devices-system-cpu      |  9 +++--
 arch/x86/coco/core.c                          |  3 ++
 arch/x86/coco/sev/core.c                      | 33 ++++++++++++++++---
 include/linux/cc_platform.h                   |  9 +++++
 4 files changed, 47 insertions(+), 7 deletions(-)

-- 
2.53.0