On Tue, May 13, 2025 at 11:16:51PM -0400, Xiaoyao Li wrote:
> Date: Tue, 13 May 2025 23:16:51 -0400
> From: Xiaoyao Li <xiaoyao...@intel.com>
> Subject: [PATCH 1/2] i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG
>  supported
> X-Mailer: git-send-email 2.43.0
> 
> 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...@zhaoxin.com>

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2894

Then QEMU gitlab can track this fix.

> Signed-off-by: Xiaoyao Li <xiaoyao...@intel.com>
> ---
>  target/i386/cpu.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Both HT and CMPLegacy depend on CPU topology (mutiple threads per
package), therefore, there's no need for extra work in TCG.

So,

Reviewed-by: Zhao Liu <zhao1....@intel.com>



Reply via email to