[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4041d4706fe55d3d012144680d9be33acdda19f.camel@intel.com>
Date: Wed, 1 Oct 2025 04:12:10 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Gao, Chao"
<chao.gao@...el.com>, "x86@...nel.org" <x86@...nel.org>
CC: "Williams, Dan J" <dan.j.williams@...el.com>, "kas@...nel.org"
<kas@...nel.org>, "yilun.xu@...ux.intel.com" <yilun.xu@...ux.intel.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 2/2] coco/tdx-host: Expose TDX module version
On Tue, 2025-09-30 at 19:22 -0700, Chao Gao wrote:
> Currently these is no way to know the TDX module version from the
^
there is
> userspace. such information is helpful for bug reporting or
^
Such
> debugging.
>
>
[...]
> +static ssize_t version_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + const struct tdx_sys_info *tdx_sysinfo = tdx_get_sysinfo();
> + const struct tdx_sys_info_version *ver;
> +
> + if (!tdx_sysinfo)
> + return -ENXIO;
> +
> + ver = &tdx_sysinfo->version;
> +
> + return sysfs_emit(buf, "%u.%u.%02u\n", ver->major_version,
> + ver->minor_version,
> + ver->update_version);
Nit: not sure whether the "%u.%u.%02u" needs a comment, e.g., why the %02u
is used for the update_version?
Powered by blists - more mailing lists