Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS

Borislav Petkov
2025-03-05T11:13:11Z

On Wed, Mar 05, 2025 at 11:52:34AM +0100, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> Current user-space tooling which needs access to the SEV_STATUS MSR is
> using the MSR module. The use of this module poses a security risk in
> any trusted execution environment and is generally discouraged.
>
> Instead, provide an file in SYSFS in the already existing
> /sys/devices/system/cpu/sev/ directory to provide the value of the
> SEV_STATUS MSR to user-space.

Right, to continue this discussion on the ML, like we said yesterday, I think
that dumping a raw MSR value is not really user-friendly.

We could stick a

Coco:

line in /proc/cpuinfo and simply dump SEV_STATUS there and TDX can put the
respective TDX-specific feature flags of what is enabled there and then we
have a good tested and well-known interface to communicate such things to
userspace through.

I'd say...

--
Regards/Gruss,
Boris.