On 3/30/21 8:00 AM, Andi Kleen wrote:Makes sense. It will be useful to find the problem with TDX Module.
Good point.+ /* MWAIT is not supported in TDX platform, so suppress it */In fact, MWAIT bit returned by CPUID instruction is zero for TD guest. This
+ setup_clear_cpu_cap(X86_FEATURE_MWAIT);
is enforced by SEAM module.
Do we still need to safeguard it by setup_clear_cpu_cap() here?I guess it doesn't hurt to do it explicitly.
If this MWAIT behavior (clearing the CPUID bit) is part of the guest
architecture, then it would also be appropriate to WARN() rather than
silently clearing the X86_FEATURE bit.