Re: [PATCH] x86: tdx: hide unused tdx_dump_mce_info()

From: Huang, Kai
Date: Wed Dec 13 2023 - 17:32:16 EST


On Wed, 2023-12-13 at 20:41 +0000, Huang, Kai wrote:
> On Wed, 2023-12-13 at 12:13 -0800, Dave Hansen wrote:
> > On 12/13/23 12:11, Huang, Kai wrote:
> > > > "The machine-check exception handler is expected to be implemented in the
> > > > VMM."
> > > I also agree. Thanks.
> >
> > Kai, could you please send a patch to fix this build problem that Arnd
> > reported?
>
> Turns out INTEL_TDX_GUEST selects X86_MCE, I think we can also just select
> X86_MCE for TDX host?
>
> config INTEL_TDX_GUEST
> bool "Intel TDX (Trust Domain Extensions) - Guest Support"
> depends on X86_64 && CPU_SUP_INTEL
> ...
> select X86_MCE
>

Turns out we have to use 'depend on' but not 'select' because with the latter I
got "mm/Kconfig:772:error: recursive dependency detected!".

I just sent out the fixing patch. I did kernel built of multiple combinations
of TDX_GUEST/TDX_HOST/X86_MCE in the Kconfig, and they all passed.