mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishen Maloor <kishen.maloor@intel.com>
To: Xu Yilun <yilun.xu@linux.intel.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <kas@kernel.org>, <rick.p.edgecombe@intel.com>,
	<dave.hansen@intel.com>, <dave.hansen@linux.intel.com>,
	<yilun.xu@intel.com>, <djbw@kernel.org>,
	<linux-coco@lists.linux.dev>, <chao.gao@intel.com>,
	<peter.fang@intel.com>, <xiaoyao.li@intel.com>
Subject: Re: [PATCH v3] x86/virt/tdx: Formalize SEAMCALL version encoding support
Date: Fri, 11 Sep 2026 12:58:58 -0700	[thread overview]
Message-ID: <a9eb5e96-1e2f-4662-9863-61317c163800@intel.com> (raw)
In-Reply-To: <20260722084634.131020-1-yilun.xu@linux.intel.com>

On 7/22/26 1:46 AM, Xu Yilun wrote:
> ...
> +/*
> + * SEAMCALL leaf:
> + *
> + * Bit 15:0	Leaf number
> + * Bit 23:16	Leaf ABI version number
> + * Bit 24	Pending interrupts detection mode
> + * Bit 63	1 for P-SEAMLDR leaf, 0 for TDX module leaf
> + */
> +#define SEAMCALL_LEAF_MASK		GENMASK_U64(15, 0)
> +#define SEAMCALL_SEAMLDR_MASK		BIT_U64(63)
> +
>  static __always_inline u64 __seamcall_dirty_cache(sc_func_t func, u64 fn,
>  						  struct tdx_module_args *args)
>  {
> +	/*
> +	 * fn contains base leaf number for TDX module calls and P-SEAMLDR
> +	 * calls. Other fields in SEAMCALL leaf like leaf ABI version number
> +	 * are in struct tdx_module_args.
> +	 */
> +	BUILD_BUG_ON(fn & ~(SEAMCALL_LEAF_MASK | SEAMCALL_SEAMLDR_MASK));
The changelog lists the SEAMLDR flag among the RAX fields that are not a good fit
for the function number definition, but 'fn' still carries it. Why does 'version'
get a field in struct tdx_module_args while the SEAMLDR flag stays in 'fn'?

Otherwise, looks fine.

Reviewed-by: Kishen Maloor <kishen.maloor@intel.com>

  parent reply	other threads:[~2026-09-11 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  8:46 Xu Yilun
2026-07-22 11:23 ` Kiryl Shutsemau
2026-07-23  5:43   ` Xu Yilun
2026-07-23  9:35 ` Nikolay Borisov
2026-07-23 18:13 ` Edgecombe, Rick P
2026-07-24  3:14   ` Xu Yilun
2026-07-24 17:05     ` Edgecombe, Rick P
2026-09-11 19:58 ` Kishen Maloor [this message]
2026-09-14  4:58   ` Xu Yilun
2026-09-15  0:18     ` Kishen Maloor

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=a9eb5e96-1e2f-4662-9863-61317c163800@intel.com \
    --to=kishen.maloor@intel.com \
    --cc=chao.gao@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=djbw@kernel.org \
    --cc=kas@kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.fang@intel.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=x86@kernel.org \
    --cc=xiaoyao.li@intel.com \
    --cc=yilun.xu@intel.com \
    --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

all inboxes | Powered by JetHome®