From: Dave Hansen <dave.hansen@intel.com>
To: Borislav Petkov <bp@alien8.de>, Joerg Roedel <jroedel@suse.de>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>, Joerg Roedel <joro@8bytes.org>,
x86@kernel.org, hpa@zytor.com,
Tom Lendacky <thomas.lendacky@amd.com>,
Nikunj A Dadhania <nikunj@amd.com>,
linux-kernel@vger.kernel.org, Larry.Dewey@amd.com
Subject: Re: [PATCH] x86/sev: Make SEV_STATUS available via SYSFS
Date: Wed, 5 Mar 2025 08:40:29 -0800 [thread overview]
Message-ID: <b0cf4bfc-bf22-4986-9e76-62e3f54179ea@intel.com> (raw)
In-Reply-To: <20250305153705.GKZ8hvoaz2GPt2rGtu@fat_crate.local>
On 3/5/25 07:37, Borislav Petkov wrote:
>> So this question boils down to whether the parsing of the bits happens
>> in kernel- or user-space. Actually there is already parsing in
>> kernel-space to print the status bits into the kernel log:
>>
>> SEV: Status: SEV SEV-ES SEV-SNP
>>
>> ... which is great for a quick glance without needing any tools. The
>> user-space tools which already exist have their own parsing of the bits
>> and for them it is much easier to consume the raw value of the
>> SEV_STATUS MSR. See my changes to snpguest:
>>
>> https://github.com/virtee/snpguest/pull/88/files
> Well, I guess we can do both:
>
> cat /sys/...
>
> SEV_STATUS(0xdeadbeef): SEV SEV-ES SEV-SNP
>
> So that people don't have to pick apart the MSR hex value.
>
>> Btw, what is the equivalent on the Intel TDX side for these feature
>> bits?
> There is none, AFAICT. That's why the whole discussion.
TDX's history isn't as exciting as SEV.
TDX guests have CPUID to tell them that they're running that way.
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.
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.
Folks certainly _want_ something in sysfs to dump the TDX module version
and so forth, but we've resisted the urge so far.
next prev parent reply other threads:[~2025-03-05 16:40 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 10:52 [PATCH] x86/sev: Make SEV_STATUS available via SYSFS Joerg Roedel
2025-03-05 11:11 ` [tip: x86/sev] " tip-bot2 for Joerg Roedel
2025-03-05 11:12 ` [PATCH] " Borislav Petkov
2025-03-05 11:26 ` Ingo Molnar
2025-03-05 11:31 ` Borislav Petkov
2025-03-05 11:35 ` Juergen Gross
2025-03-05 11:41 ` Borislav Petkov
2025-03-05 11:48 ` Jürgen Groß
2025-03-05 11:53 ` Borislav Petkov
2025-03-05 11:42 ` Ingo Molnar
2025-03-05 11:50 ` Borislav Petkov
2025-03-05 13:56 ` Joerg Roedel
2025-03-05 15:37 ` Borislav Petkov
2025-03-05 16:37 ` Dave Hansen
2025-03-05 16:40 ` Dave Hansen [this message]
2025-03-05 16:55 ` Borislav Petkov
2025-03-05 17:09 ` Dave Hansen
2025-03-05 17:51 ` Joerg Roedel
2025-03-05 20:07 ` Borislav Petkov
2025-03-06 8:01 ` Kirill A. Shutemov
2025-03-06 8:38 ` Joerg Roedel
2025-03-06 10:31 ` Borislav Petkov
2025-03-06 13:36 ` Kirill A. Shutemov
2025-03-06 13:56 ` Borislav Petkov
2025-03-06 10:37 ` Alexey Gladkov (Intel)
2025-03-10 10:28 ` Joerg Roedel
2025-03-10 11:02 ` Borislav Petkov
2025-03-10 12:46 ` Joerg Roedel
2025-03-10 13:36 ` Borislav Petkov
2025-03-10 11:24 ` Alexey Gladkov
2025-03-10 12:28 ` Juergen Gross
2025-03-10 12:35 ` Joerg Roedel
2025-03-10 12:49 ` Juergen Gross
2025-03-10 13:38 ` Borislav Petkov
2025-03-10 14:39 ` Tom Lendacky
2025-03-10 14:50 ` Alexey Gladkov
2025-03-10 15:11 ` Borislav Petkov
2025-03-10 15:33 ` Jürgen Groß
2025-03-10 15:41 ` Borislav Petkov
2025-03-10 15:50 ` Alexey Gladkov
2025-03-10 15:43 ` Alexey Gladkov
2025-03-10 15:52 ` Juergen Gross
2025-03-10 15:55 ` Borislav Petkov
2025-03-10 16:00 ` Juergen Gross
2025-03-10 16:06 ` Borislav Petkov
2025-03-10 16:23 ` Jürgen Groß
2025-03-10 16:05 ` Alexey Gladkov
2025-03-11 9:43 ` Joerg Roedel
2025-03-11 10:22 ` Jürgen Groß
2025-03-11 11:07 ` Borislav Petkov
2025-03-11 11:14 ` Juergen Gross
2025-03-11 18:24 ` Alexey Gladkov
2025-03-11 18:40 ` Joerg Roedel
2025-03-11 20:37 ` Alexey Gladkov
2025-03-12 7:19 ` Kirill A. Shutemov
2025-03-12 8:23 ` Joerg Roedel
2025-03-12 8:48 ` Kirill A. Shutemov
2025-03-12 9:07 ` Joerg Roedel
2025-03-12 10:59 ` Kirill A. Shutemov
2025-03-12 11:44 ` Joerg Roedel
2025-03-11 18:13 ` Alexey Gladkov
2025-03-05 13:50 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0cf4bfc-bf22-4986-9e76-62e3f54179ea@intel.com \
--to=dave.hansen@intel.com \
--cc=Larry.Dewey@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nikunj@amd.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox