Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS
From: Borislav Petkov
Date: Thu Mar 06 2025 - 05:32:12 EST
On Thu, Mar 06, 2025 at 09:38:21AM +0100, Joerg Roedel wrote:
> On Thu, Mar 06, 2025 at 10:01:17AM +0200, Kirill A. Shutemov wrote:
> > Alexey looking into exposing TDX module version in sysfs for both guest
> > and host.
> >
> > I think it would be useful for guest to make attributes and TD_CTLS
> > available via sysfs. So far, we only dump them in dmesg on boot (see
> > 564ea84c8c14).
>
> Okay, do you have ideas already on where to put this information in
> SYSFS?
Right, I was thinking about it: sysfs does a one-datum-per-file thing and that
would go nuts very quickly.
I'm thinking we probably should design something like /proc/cpuinfo where we
have a single file with coco-specific infos per line:
SEV: ...
* fw_info: ...
* features: ...
TDX: ...
* TD_CTLS: ...
* features: ...
I mean, we'll agree on what the most optimal format is but having a single
file would make this a lot saner for everyone involved.
So maybe stick it in /proc...?
I'm not sure if /proc accepts any new files - I can't find anything after
a quick search but this would be the perfect place for that...
Hmmm.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette