linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Huang, Kai" <kai.huang@intel.com>
To: "kas@kernel.org" <kas@kernel.org>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"yilun.xu@linux.intel.com" <yilun.xu@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gao, Chao" <chao.gao@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Subject: Re: [PATCH 2/2] coco/tdx-host: Expose TDX module version
Date: Wed, 1 Oct 2025 21:41:02 +0000	[thread overview]
Message-ID: <4619ca4ec7097678b387e003c76f44c879524a88.camel@intel.com> (raw)
In-Reply-To: <4ukjpckzgbfyef7wrajivc6qzw4ycdudmqdr55rbcz6fsecv5c@yovyjdmhs4tg>

On Wed, 2025-10-01 at 12:27 +0100, Kiryl Shutsemau wrote:
> On Wed, Oct 01, 2025 at 04:12:10AM +0000, Huang, Kai wrote:
> > 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?
> 
> That's how TDX module version formatted:
> 
> https://github.com/intel/tdx-module/tags
> 
> I think it is good idea to match it.

Yeah agreed!

  reply	other threads:[~2025-10-01 21:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01  2:22 [PATCH 0/2] Expose TDX Module version Chao Gao
2025-10-01  2:22 ` [PATCH 1/2] x86/virt/tdx: Retrieve TDX module version Chao Gao
2025-10-01 15:15   ` Dave Hansen
2025-10-22  7:54     ` Chao Gao
2025-10-22 10:26       ` Kiryl Shutsemau
2025-10-24  6:33         ` Chao Gao
2025-10-24  9:35           ` Kiryl Shutsemau
2025-10-24 10:04             ` Chao Gao
2025-11-13  1:24       ` Chao Gao
2025-10-24 14:20   ` Vishal Annapurve
2025-10-01  2:22 ` [PATCH 2/2] coco/tdx-host: Expose " Chao Gao
2025-10-01  4:12   ` Huang, Kai
2025-10-01 11:27     ` Kiryl Shutsemau
2025-10-01 21:41       ` Huang, Kai [this message]
2025-10-01 11:30   ` Kiryl Shutsemau

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=4619ca4ec7097678b387e003c76f44c879524a88.camel@intel.com \
    --to=kai.huang@intel.com \
    --cc=chao.gao@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kas@kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    --cc=yilun.xu@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).