[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36988bb6-af90-4f1a-94ce-353fb5cba2ca@intel.com>
Date: Mon, 12 May 2025 12:40:43 -0500
From: "Xing, Cedric" <cedric.xing@...el.com>
To: Greg KH <greg@...ah.com>, Dan Williams <dan.j.williams@...el.com>
CC: Stephen Rothwell <sfr@...b.auug.org.au>,
<sathyanarayanan.kuppuswamy@...ux.intel.com>, <yilun.xu@...el.com>,
<sameo@...osinc.com>, <aik@....com>, <suzuki.poulose@....com>,
<steven.price@....com>, <lukas@...ner.de>, Thomas Weißschuh
<linux@...ssschuh.net>, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the devsec-tsm tree
On 5/9/2025 2:12 AM, Greg KH wrote:
[...]
> But what are these binary files for? I looked in the documentation and
> found this entry:
> /sys/devices/virtual/misc/tdx_guest/measurements/rtmr[0123]:sha384
> is that these binary files?
>
All files (including rtmr[0123]:sha384) under
/sys/devices/virtual/misc/tdx_guest/measurements/ are TDX measurement
registers, one file (sysfs binary attribute) per each register.
> Why is sysfs being used to expose binary "registers" and not done
> through the ioctl api instead?
Sysfs is preferred over ioctl for exposing TD measurement registers for
several reasons:
- Global Register Values: The register values are global and not tied to
specific file descriptors of the tdx_guest device.
- Intuitive Operations: The operations supported by these registers can
be intuitively mapped to file read/write operations.
- Ease of Access: Sysfs attributes allow easy enumeration and access
from all programming languages, including shell commands and scripts.
This ease of access is beneficial for application debugging, enabling,
and platform diagnosis/maintenance, as these measurements are relevant
to all SW running inside the same TD.
> That's an internal kernel-computed
> structure, not coming from the hardware, or am I mistaken?
>
These are measurement registers of the current TD on Intel platforms.
They are read together via the TDG.MR.REPORT TDCALL then broken down
into individual register values. They are NOT computed by the kernel but
come directly from the TDX ISA.
Powered by blists - more mailing lists