From: Dave Hansen <dave.hansen@linux.intel.com>
To: dave.hansen@linux.intel.com
Subject: Re: [PATCH v9 17/23] x86/virt/seamldr: Do TDX per-CPU initialization after module installation
In-Reply-To: <20260513151045.1420990-18-chao.gao@intel.com>
References: <20260513151045.1420990-18-chao.gao@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[Draft review generated by x86-maintainer-agent applying Dave_Hansen.txt
 rules to the v9 series.  Strip this banner before sending.]

> -static int tdx_cpu_enable(void)
> +int tdx_cpu_enable(void)

You're turning an internal helper into an inter-file API.  Two small
hygiene asks:

  - The kerneldoc-style block right above tdx_cpu_enable() in tdx.c is
    currently written for an internal helper.  Now that it's an
    exported API (declared in <asm/tdx.h>), rewrite the comment to be
    what callers need to know -- e.g. "must be called on the local
    CPU with preemption disabled; returns 0 on success or negative
    errno on TDX SEAMCALL failure".

  - Confirm nobody outside of arch/x86 calls this.  If only
    arch/x86/virt/vmx/tdx/seamldr.c needs it, putting the
    declaration in arch/x86/virt/vmx/tdx/tdx.h (the in-tree header,
    not the asm/ one exposed kernel-wide) keeps the surface small.
    RULE 16 -- don't expose more than needed.

Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>  [with the
                                                        comment / scope
                                                        cleanup]
