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

Juergen Gross
2025-03-05T11:36:00Z

[-- Attachment #1.1.1: Type: text/plain, Size: 1103 bytes --]

On 05.03.25 12:31, Borislav Petkov wrote:
> On Wed, Mar 05, 2025 at 12:26:13PM +0100, Ingo Molnar wrote:
>> It's *far* better to expose this via a targeted sysfs entry than
>> polluting /proc/cpuinfo with it that everyone and their dog is parsing
>> all the time ...
>
> Pasting what we're talking on IRC:
>
> - we don't want to expose a naked MSR u64 to userspace. Might as well use
> msr-tools
>
> - the backstory is, there are a bunch of tools which wanna know this so we
> need to agree on how to supply it to them
>
> - I think /proc/cpuinfo is the best option right now
>
> - and then TDX can use the same thing too
>
> - we have a general need to expose what a confidential guest supports
>
> - a .../sev sysfs file clearly doesn't cut it because TDX doesn't have "sev"
> - it is the Intel version of a confidential guest
>
> - and I don't want to have "0xdeadbeef" in some sys file but "SEV SEV-ES TDX
> SecureTSC" and so on user-readable strings

There is /sys/hypervisor/

Why don't put it there? Maybe under /sys/hypervisor/coco.

Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]