Re: [PATCH v5] x86/virt/tdx: Formalize SEAMCALL leaf version encoding support

From: Tony Lindgren

Date: Mon Sep 07 2026 - 07:28:01 EST


On Tue, Sep 01, 2026 at 06:54:36PM +0800, Xu Yilun wrote:
> --- a/arch/x86/include/asm/shared/tdx.h
> +++ b/arch/x86/include/asm/shared/tdx.h
> @@ -122,9 +122,11 @@
> #include <linux/compiler_attributes.h>
>
> /*
> - * 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.
> */

For better readability and a few less lines of changes, you could just
add a one-liner to the existing comments:

Note that "version" gets encoded into RAX along with the leaf number.

Anyways, I'm happy with the current version without changes. The patch
cleans up the version encoding issue nicely, so:

Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>