|
@@ -7883,6 +7883,21 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
|
|
|
*/
|
|
|
cpu->mwait.ecx |= CPUID_MWAIT_EMX | CPUID_MWAIT_IBE;
|
|
|
|
|
|
+ /*
|
|
|
+ * 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.
|
|
|
+ */
|
|
|
+ if (IS_AMD_CPU(env) &&
|
|
|
+ !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) &&
|
|
|
+ env->topo_info.threads_per_core > 1) {
|
|
|
+ warn_report_once("This family of AMD CPU doesn't support "
|
|
|
+ "hyperthreading(%d). Please configure -smp "
|
|
|
+ "options properly or try enabling topoext "
|
|
|
+ "feature.", env->topo_info.threads_per_core);
|
|
|
+ }
|
|
|
+
|
|
|
/* For 64bit systems think about the number of physical bits to present.
|
|
|
* ideally this should be the same as the host; anything other than matching
|
|
|
* the host can cause incorrect guest behaviour.
|
|
@@ -7987,21 +8002,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
|
|
|
x86_cpu_gdb_init(cs);
|
|
|
qemu_init_vcpu(cs);
|
|
|
|
|
|
- /*
|
|
|
- * 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.
|
|
|
- */
|
|
|
- if (IS_AMD_CPU(env) &&
|
|
|
- !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) &&
|
|
|
- env->topo_info.threads_per_core > 1) {
|
|
|
- warn_report_once("This family of AMD CPU doesn't support "
|
|
|
- "hyperthreading(%d). Please configure -smp "
|
|
|
- "options properly or try enabling topoext "
|
|
|
- "feature.", env->topo_info.threads_per_core);
|
|
|
- }
|
|
|
-
|
|
|
#ifndef CONFIG_USER_ONLY
|
|
|
x86_cpu_apic_realize(cpu, &local_err);
|
|
|
if (local_err != NULL) {
|