]> Git Repo - qemu.git/commitdiff
i386: Remove generic SMT thread check
authorBabu Moger <[email protected]>
Tue, 19 Jun 2018 21:31:59 +0000 (17:31 -0400)
committerEduardo Habkost <[email protected]>
Fri, 22 Jun 2018 18:01:15 +0000 (15:01 -0300)
Remove generic non-intel check while validating hyperthreading support.
Certain AMD CPUs can support hyperthreading now.

CPU family with TOPOEXT feature can support hyperthreading now.

Signed-off-by: Babu Moger <[email protected]>
Tested-by: Geoffrey McRae <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Message-Id: <1529443919[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
target/i386/cpu.c

index d6ed29b484dfb4afc2cff55f973d0b67220057c3..e6c2f8a22a3a309b941fc30d7415f3ca78248419 100644 (file)
@@ -4985,17 +4985,22 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
 
     qemu_init_vcpu(cs);
 
-    /* Only Intel CPUs support hyperthreading. Even though QEMU fixes this
-     * issue by adjusting CPUID_0000_0001_EBX and CPUID_8000_0008_ECX
-     * based on inputs (sockets,cores,threads), it is still better to gives
+    /*
+     * Most Intel and certain AMD CPUs support hyperthreading. Even though QEMU
+     * fixes this issue by adjusting CPUID_0000_0001_EBX and CPUID_8000_0008_ECX
+     * based on inputs (sockets,cores,threads), it is still better to give
      * users a warning.
      *
      * NOTE: the following code has to follow qemu_init_vcpu(). Otherwise
      * cs->nr_threads hasn't be populated yet and the checking is incorrect.
      */
-    if (!IS_INTEL_CPU(env) && cs->nr_threads > 1 && !ht_warned) {
-        error_report("AMD CPU doesn't support hyperthreading. Please configure"
-                     " -smp options properly.");
+     if (IS_AMD_CPU(env) &&
+         !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) &&
+         cs->nr_threads > 1 && !ht_warned) {
+            error_report("This family of AMD CPU doesn't support "
+                         "hyperthreading(%d). Please configure -smp "
+                         "options properly or try enabling topoext feature.",
+                         cs->nr_threads);
         ht_warned = true;
     }
 
This page took 0.025094 seconds and 4 git commands to generate.