On Wed, 2024-01-31 at 11:31 +0000, Huang, Kai wrote:Hmm right this doesn't work for crash kexec. Thanks for pointing out.
Note kexec() can happen at anytime, including when TDX module is
being
initialized. Register TDX reboot notifier callback to stop further
TDX
module initialization. If there's any ongoing module initialization,
wait until it finishes. This makes sure the TDX module status is
stable
after the reboot notifier callback, and the later kexec() code can
read
module status to decide whether PAMTs are stable and available.
I don't see how this works with the crash kernel flavor of kexec. Did
you look at that scenario?