Re: [PATCH v13 003/113] KVM: TDX: Initialize the TDX module when loading the KVM intel kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> > +static bool enable_tdx __ro_after_init;
> > +module_param_named(tdx, enable_tdx, bool, 0444);
> > +
> > +static __init int vt_hardware_setup(void)
> > +{
> > +	int ret;
> > +
> > +	ret = vmx_hardware_setup();
> > +	if (ret)
> > +		return ret;
> > +
> > +	enable_tdx = enable_tdx && !tdx_hardware_setup(&vt_x86_ops);
> 
> Unfortunately, the enable_tdx should also be protected by the
> cpus_read_lock(),
> because CPU hotplug code path checks it too (as seen in your next patch).

Sorry I was wrong.  I forgot the CPU hotplug callbacks are registered in
kvm_init(), which happens after hardware_setup(), so the CPU hotplug code cannot
race with this hardware_setup() code here.

[...]

> 
> I think you can merge next patch with this one because they are kinda related.
>  
> 
> Putting them together allows people to review more easily.

And perhaps this isn't necessary either.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux