mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xu Yilun <yilun.xu@linux.intel.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Tony Lindgren <tony.lindgren@linux.intel.com>,
	dave.hansen@linux.intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, kas@kernel.org,
	nik.borisov@suse.com, rick.p.edgecombe@intel.com,
	yilun.xu@intel.com, linux-coco@lists.linux.dev
Subject: Re: [PATCH v5] x86/virt/tdx: Formalize SEAMCALL leaf version encoding support
Date: Tue, 8 Sep 2026 10:06:58 +0800	[thread overview]
Message-ID: <ap9twgQA2avLI+ro@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <2ef38e83-dacc-4e2f-9b22-b02381664d9e@intel.com>

On Mon, Sep 07, 2026 at 07:35:31AM -0700, Dave Hansen wrote:
> On 9/7/26 04:20, Tony Lindgren wrote:
> >  /*
> > - * Used in __tdcall*() to gather the input/output registers' values of the
> > - * TDCALL instruction when requesting services from the TDX module. This is a
> > - * software only structure and not part of the TDX module/VMM ABI
> > + * Used in __tdcall*() to gather the input/output parameters of the TDCALL
> > + * instruction when requesting services from the TDX module. "version" is
> > + * encoded in RAX along with the leaf number. Others are raw input/output
> > + * registers' values. This is a software only structure and not part of the TDX
> > + * module/VMM ABI.
> >   */
> 
> It's a wee bit silly to talk about "version" in here. If you need to
> comment on "version" specifically, then put a comment *on* that variable.

Yes. I'll recover the original structure description and comment on the
"version".

And Thank Tony for the description for "version".

----8<----

 /*
- * Used in __tdcall*() to gather the input/output parameters of the TDCALL
- * instruction when requesting services from the TDX module. "version" is
- * encoded in RAX along with the leaf number. Others are raw input/output
- * registers' values. This is a software only structure and not part of the TDX
- * module/VMM ABI.
+ * Used in __tdcall*() to gather the input/output registers' values of the
+ * TDCALL instruction when requesting services from the TDX module. This is a
+ * software only structure and not part of the TDX module/VMM ABI
  */
 struct tdx_module_args {
        /* callee-clobbered */
@@ -145,7 +143,10 @@ struct tdx_module_args {
        u64 rbx;
        u64 rdi;
        u64 rsi;
-       /* leaf ABI version, encoded in rax */
+       /*
+        * leaf ABI version. Note that it gets encoded into RAX along with the
+        * leaf number.
+        */
        u8  version;
 };

  reply	other threads:[~2026-09-08  2:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 10:54 Xu Yilun
2026-09-07 11:20 ` Tony Lindgren
2026-09-07 14:35   ` Dave Hansen
2026-09-08  2:06     ` Xu Yilun [this message]
2026-09-08  6:26 ` Binbin Wu
2026-09-08  9:43   ` Xu Yilun
2026-09-10  6:21     ` Binbin Wu
2026-09-10 20:14 ` Edgecombe, Rick P
2026-09-10 20:15   ` Edgecombe, Rick P

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=ap9twgQA2avLI+ro@yilunxu-OptiPlex-7050 \
    --to=yilun.xu@linux.intel.com \
    --cc=dave.hansen@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=nik.borisov@suse.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tony.lindgren@linux.intel.com \
    --cc=x86@kernel.org \
    --cc=yilun.xu@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

all inboxes | Powered by JetHome®