This reverts commit c6bd2dd634208ca717b6dc010064fe34d1359080.
---
 target/i386/cpu.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 9689f6374e..c648a1cf04 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6859,6 +6859,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, 
uint32_t count,
         *edx = env->features[FEAT_1_EDX];
         if (threads_per_pkg > 1) {
             *ebx |= threads_per_pkg << 16;
+            *edx |= CPUID_HT;
         }
         if (!cpu->enable_pmu) {
             *ecx &= ~CPUID_EXT_PDCM;
@@ -7838,20 +7839,6 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
         }
     }
 
-    if (x86_threads_per_pkg(&env->topo_info) > 1) {
-        env->features[FEAT_1_EDX] |= CPUID_HT;
-
-        /*
-         * The Linux kernel checks for the CMPLegacy bit and
-         * discards multiple thread information if it is set.
-         * So don't set it here for Intel (and other processors
-         * following Intel's behavior) to make Linux guests happy.
-         */
-        if (!IS_INTEL_CPU(env) && !IS_ZHAOXIN_CPU(env)) {
-            env->features[FEAT_8000_0001_ECX] |= CPUID_EXT3_CMP_LEG;
-        }
-    }
-
     for (i = 0; i < ARRAY_SIZE(feature_dependencies); i++) {
         FeatureDep *d = &feature_dependencies[i];
         if (!(env->features[d->from.index] & d->from.mask)) {
-- 
2.39.5 (Apple Git-154)


Reply via email to