From: Dave Hansen <dave.hansen@linux.intel.com>
To: dave.hansen@linux.intel.com
Subject: Re: [PATCH v9 06/23] x86/virt/seamldr: Introduce a wrapper for P-SEAMLDR SEAMCALLs
In-Reply-To: <20260513151045.1420990-7-chao.gao@intel.com>
References: <20260513151045.1420990-7-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 __maybe_unused int seamldr_call(u64 fn, struct tdx_module_args *args)
> +{
> +	guard(raw_spinlock)(&seamldr_lock);
> +	return seamcall_prerr(fn, args);
> +}

__maybe_unused as a transitional marker for "this gets a caller in the
next patch" is legitimate, but it does mean this commit, on its own,
builds dead code.  No action required -- just noting that the next
patch (07/23) must wire it up or this attribute should be dropped.

The raw_spinlock comment is exactly the kind of "why" the code wants
(RULE 2):

  /*
   * Serialize P-SEAMLDR calls since the hardware only allows a single CPU to
   * interact with P-SEAMLDR simultaneously. Use raw version as the calls can
   * be made with interrupts disabled, where plain spinlocks are prohibited in
   * PREEMPT_RT kernels as they become sleeping locks.
   */

Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
