Re: [PATCH 10/25] KVM: TDX: Initialize KVM supported capabilities when module setup
From: Tony Lindgren
Date: Thu Aug 29 2024 - 00:52:09 EST
On Mon, Aug 26, 2024 at 02:04:27PM +0300, Nikolay Borisov wrote:
> On 13.08.24 г. 1:48 ч., Rick Edgecombe wrote:
> > From: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> > static int tdx_online_cpu(unsigned int cpu)
> > {
> > unsigned long flags;
> > @@ -217,11 +292,16 @@ static int __init __tdx_bringup(void)
> > goto get_sysinfo_err;
> > }
> > + r = setup_kvm_tdx_caps();
>
> nit: Since there are other similarly named functions that come later how
> about rename this to init_kvm_tdx_caps, so that it's clear that the
> functions that are executed ones are prefixed with "init_" and those that
> will be executed on every TDV boot up can be named prefixed with "setup_"
We can call setup_kvm_tdx_caps() from from tdx_get_kvm_supported_cpuid(),
and drop the struct kvm_tdx_caps. So then the setup_kvm_tdx_caps() should
be OK.
Regards,
Tony