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

Borislav Petkov
2025-03-05T16:55:28Z

On Wed, Mar 05, 2025 at 08:40:29AM -0800, Dave Hansen wrote:
> TDX guests have CPUID to tell them that they're running that way.

And those CPUID leafs cannot be modified or intercepted or so by the
hypervisor?

> TDX hosts are much more arcane. You can't _actually_ know that it's a
> TDX host until you actually start making successful SEAMCALLs and the
> TDX module answers them. But we fudge it by just looking at
> MSR_IA32_MKTME_KEYID_PARTITIONING at boot and assuming that anything
> with that MSR will be able to be a TDX host.

Fun. :)

> We've just got X86_FEATUREs for hosts and guests:
>
> #define X86_FEATURE_TDX_HOST_PLATFORM ( 7*32+ 7)
> #define X86_FEATURE_TDX_GUEST ( 8*32+22)
>
> and that's it.

And there are no new ones coming down the pipe?

> Folks certainly _want_ something in sysfs to dump the TDX module version
> and so forth, but we've resisted the urge so far.

Perhaps now is the time do design something together...

I was thinking

/sys/guest/...

or something tied to the x86_platform gunk so that we can stick always some
info there about any platform arch/x86/ has detected and is running on...

Hmmm.

--
Regards/Gruss,
Boris.