]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG supported
authorXiaoyao Li <xiaoyao.li@intel.com>
Wed, 14 May 2025 03:16:51 +0000 (23:16 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 22 May 2025 11:27:12 +0000 (14:27 +0300)
commit2f6357ca962568d2127ee97630997c31543bf0c0
tree6a4bb8f4c7e6cbe7b1e3fd1830c23441f53a941b
parent9ac56fb385e94c6382928d604034861e189cfb0c
i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG supported

Since commit c6bd2dd63420 ("i386/cpu: Set up CPUID_HT in
x86_cpu_expand_features() instead of cpu_x86_cpuid()") and
commit 99a637a86f55 ("i386/cpu: Set and track CPUID_EXT3_CMP_LEG in
env->features[FEAT_8000_0001_ECX]"), it gets warnings when booting the
VM with vcpus >= 2 and with tcg:

  qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:EDX.ht [bit 28]
  qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.cmp-legacy [bit 1]

This is because, after the two commits, CPUID_HT and CPUID_EXT3_CMP_LEG
are set in env->features[] when vcpus >=2 (in x86_cpu_expand_features())
later in x86_cpu_filter_features() it will check against the TCG supported
bits. However, current TCG doesn't mark the two bits as supported, hence
the warnings.

Fix it by adding the two bits to the supported bits of TCG since multiple
vcpus are supported by TCG.

Fixes: c6bd2dd63420 ("i386/cpu: Set up CPUID_HT in x86_cpu_expand_features() instead of cpu_x86_cpuid()")
Fixes: 99a637a86f55 ("i386/cpu: Set and track CPUID_EXT3_CMP_LEG in env->features[FEAT_8000_0001_ECX]")
Reported-by: Ewan Hai <ewanhai-oc@zhaoxin.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250514031652.838763-2-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 5979f50fa9fdbb3fb49e2b498f84faa7503c8ed1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/i386/cpu.c