@samitouri / QOSamiQemu / commits / db13fe80ef

i386/tdx: Add CPUID_24_0_EBX_AVX10_VL_MASK as supported

AVX10 depends on CPUID_24_0_EBX_AVX10_VL_MASK as defined in feature_dependencies[]. Currently CPUID_24_0_EBX_AVX10_VL_MASK is always not supported for TDX, so AVX10 cannot be exposed to TD guest. The TDX virtualization type of these bits is "XFAM & CPUID_Enabled & Native": their value is determined by XFAM[5:7], the AVX10 CPUID bit, and the native hardware value. For simplicity, add CPUID_24_0_EBX_AVX10_VL_MASK to tdx_xfam_deps[] under the AVX512/XFAM dependency, without separately checking the AVX10 bit. It's safe because any invalid combination supplied by the user will be caught by tdx_check_features(). Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Tested-by: Chenyi Qiang <chenyi.qiang@intel.com> Link: https://lore.kernel.org/r/20260512082108.621596-4-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Xiaoyao Li committed May 12, 2026 at 16:21 UTC db13fe80ef455f9e2be60c1bdc6be67a6b82d24f
1 file changed +4
target/i386/kvm/tdx.c
+4
@@ -571,6 +571,9 @@ typedef struct TdxXFAMDep {
571 * - AMX alias bits, their type is "CPUID_Enabled & Native" which means their
572 * value is determined by the CPUID bit they are aliased to.
573 *
574 + * - AVX10_VL_MASK, their type is "XFAM & CPUID_Enabled & Native" which means
575 + * their value is determined by both the corresponding XFAM bit and CPUID bit.
576 + *
577 * For simplicity, relax the dependency to related XFAM bit.
578 * tdx_check_features() will eventually catch the unsupported configurations.
579 */
@@ -579,6 +582,7 @@ TdxXFAMDep tdx_xfam_deps[] = {
582 { XSTATE_YMM_BIT, { FEAT_7_0_EBX, CPUID_7_0_EBX_AVX2 } },
583 { XSTATE_OPMASK_BIT, { FEAT_7_0_ECX, CPUID_7_0_ECX_AVX512_VBMI } },
584 { XSTATE_OPMASK_BIT, { FEAT_7_0_EDX, CPUID_7_0_EDX_AVX512_FP16 } },
585 + { XSTATE_OPMASK_BIT, { FEAT_24_0_EBX, CPUID_24_0_EBX_AVX10_VL_MASK } },
586 { XSTATE_PT_BIT, { FEAT_7_0_EBX, CPUID_7_0_EBX_INTEL_PT } },
587 { XSTATE_PKRU_BIT, { FEAT_7_0_ECX, CPUID_7_0_ECX_PKU } },
588 { XSTATE_CET_U_BIT, { FEAT_7_0_ECX, CPUID_7_0_ECX_CET_SHSTK } },