Re: [PATCH v7 06/20] x86/virt/tdx: Shut down TDX module in case of error

From: Huang, Kai
Date: Tue Nov 22 2022 - 19:58:57 EST


On Tue, 2022-11-22 at 11:24 -0800, Dave Hansen wrote:
> > I was expecting TDX to not get initialized until the first TDX using KVM
> > instance is created. Am I wrong?
>
> I went looking for it in this series to prove you wrong.  I failed.  :)
>
> tdx_enable() is buried in here somewhere:
>
> > https://lore.kernel.org/lkml/CAAhR5DFrwP+5K8MOxz5YK7jYShhaK4A+2h1Pi31U_9+Z+cz-0A@xxxxxxxxxxxxxx/T/
>
> I don't have the patience to dig it out today, so I guess we'll have Kai
> tell us.

It will be done when KVM module is loaded, but not when the first TDX guest is
created.