Re: [PATCH v3 2/4] KVM: TDX: Report CORE_CAPABILITIES as configurable
From: Tony Lindgren
Date: Tue Sep 01 2026 - 02:47:42 EST
On Thu, Aug 27, 2026 at 11:18:35AM +0800, Binbin Wu wrote:
> Add CORE_CAPABILITIES (CPUID.0x7.0.EDX[30]) to KVM's allowlist of TDX
> directly configurable CPUID feature bits, even though KVM doesn't support
> MSR_IA32_CORE_CAPS for TDX guests, to accommodate legacy TDX module
> behavior.
>
> Older TDX specs define the CORE_CAPABILITIES CPUID bit as fixed-1, so
> userspace may expect the bit to be enabled for TDs. If the bit becomes
> directly configurable in a newer TDX module but is not reported as such to
> userspace, userspace can no longer enable it once KVM starts validating
> the CPUID configuration input.
>
> Reporting CORE_CAPABILITIES as configurable keeps userspace able to enable
> the bit across the fixed-1 => configurable transition, and lets userspace
> infer that the bit is no longer fixed-1 so it can adjust its expectations.
>
> Keep MSR_IA32_CORE_CAPS unsupported for TDX guests, as existing TDX users
> have not needed guest access to the MSR, and advertising the CPUID bit as
> configurable is enough for userspace to handle the legacy-module
> compatibility case.
Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>