Re: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand
From: Peter Zijlstra
Date: Fri Jun 30 2023 - 05:23:37 EST
On Thu, Jun 29, 2023 at 12:15:13AM +0000, Huang, Kai wrote:
> > Can be called locally or through an IPI function call.
> >
>
> Thanks. As in another reply, if using spinlock is OK, then I think we can say
> it will be called either locally or through an IPI function call. Otherwise, we
> do via a new separate function tdx_global_init() and no lock is needed in that
> function. The caller should call it properly.
IPI must use raw_spinlock_t. I'm ok with using raw_spinlock_t if there's
actual need for that, but the code as presented didn't -- in comments or
otherwise -- make it clear why it was as it was.
TDX not specifying time constraints on the various TD/SEAM-CALLs is
ofcourse sad, but alas.