lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v14 07/23] x86/virt/tdx: Add skeleton to enable TDX on demand
From


On 18.10.23 г. 11:29 ч., Huang, Kai wrote:
>
>>> +/*
>>> + * Do the module global initialization once and return its result.
>>> + * It can be done on any cpu. It's always called with interrupts
>>> + * disabled.
>>> + */
>>> +static int try_init_module_global(void)
>>> +{
>>
>> Any particular reason why this function is not called from the tdx
>> module's tdx_init? It's global and must be called once when the module
>> is initialised. Subsequently kvm which is supposed to call
>> tdx_cpu_enable() must be sequenced _after_ tdx which shouldn't be that
>> hard, no? This will eliminate the spinlock as well.
>>
>
> Do you mean early_initcall(tdx_init)?
>
> Because it requires VMXON being done to do SEAMCALL. For now only KVM does
> VMXON.
>

Right, then would it not make more sense too have this code as part of
the KVM bringup of TDX. In fact by keeping the 2 series separate you
might be adding complexity. What is the initial motivation to keep those
patches out of the KVM tdx host series support?

\
 
 \ /
  Last update: 2023-10-18 10:39    [W:0.438 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site