@@ -6995,12 +6995,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
/* 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 to make Linux guests happy.
+ * So don't set it here for Intel(and other processors
+ * following Intel's behavior) to make Linux guests happy.
*/
if (threads_per_pkg > 1) {
- if (env->cpuid_vendor1 != CPUID_VENDOR_INTEL_1 ||
- env->cpuid_vendor2 != CPUID_VENDOR_INTEL_2 ||
- env->cpuid_vendor3 != CPUID_VENDOR_INTEL_3) {
+ if (!IS_INTEL_CPU(env) && !IS_ZHAOXIN_CPU(env)) {
*ecx |= 1 << 1; /* CmpLegacy bit */
}
}