Re: [PATCH v8 02/11] x86/tdx: Introduce INTEL_TDX_GUEST config option

From: Kuppuswamy, Sathyanarayanan
Date: Tue Oct 05 2021 - 10:43:14 EST




On 10/5/21 7:09 AM, Dave Hansen wrote:
For the TDX guest, x2apic will be emulated. So it will exist in our
case. Even if x2apic or TDX guest is not supported by CPU, it will
boot just fine.
This doesn't really explain the "select X86_X2APIC", though.

You just said that TDX doesn't*require* X2APIC. So, why is it being

I meant for a valid TD guest, x2APIC will *always* be emulated. It is
also specified in the spec.

Please check sec "TD Hardware" in Intel TDX Virtual Firmware Design Guide
or "Interrupt Handling and APIC Virtualization" section in Intel Trust
Domain Extensions Module specification.

For the case without x2APIC, TDX initialization should fail (hence TDX)
will not be enabled). So in non-TDX mode, kernel will boot fine. But
in TDX mode, current behavior should be "kernel hang"

selected? What is the specific connection between TDX and X2APIC?

X2APIC is used manage interrupts in virtualized environment (like TDX
guest). So it is required for interrupt management.

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer