Re: [PATCH v7 003/102] KVM: Refactor CPU compatibility check on module initialiization

From: Kai Huang
Date: Tue Jul 12 2022 - 23:16:59 EST



> > + /* hardware_enable_nolock() checks CPU compatibility on each CPUs. */
> > + r = hardware_enable_all();
> > + if (r)
> > + goto out_free_2;
> > + /*
> > + * Arch specific initialization that requires to enable virtualization
> > + * feature. e.g. TDX module initialization requires VMXON on all
> > + * present CPUs.
> > + */
> > + kvm_arch_post_hardware_enable_setup(opaque);
>
> Please see my reply to your patch "KVM: TDX: Initialize TDX module when loading
> kvm_intel.ko".
>
> The introduce of __weak kvm_arch_post_hardware_enable_setup() should be in that
> patch since it has nothing to do the job you claimed to do in this patch.
>
> And by removing it, this patch can be taken out of TDX series and upstreamed
> separately.

I tried to dig more about the history. Please see my another reply and ignore
this.