diff options
-rw-r--r-- | target/i386/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 533c9d9..1a2cae6 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8393,6 +8393,17 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *eax |= (cpu->guest_phys_bits << 16); } *ebx = env->features[FEAT_8000_0008_EBX]; + + /* + * Don't emulate Bits [7:0] & Bits [15:12] for Intel/Zhaoxin, since + * they're using 0x1f leaf. + */ + if (cpu->vendor_cpuid_only_v2 && + (IS_INTEL_CPU(env) || IS_ZHAOXIN_CPU(env))) { + *ecx = *edx = 0; + break; + } + if (threads_per_pkg > 1) { /* * Bits 15:12 is "The number of bits in the initial |