This reverts commit d0975531586742ec2eff8796b7ba93bc4858e63d, which is a modified commit a62fef58299562aae6667b8d8552247423e886b3 from the master branch.
Since more changes from the master branch are needed in the areas which are being touched by this one, and this change has been modified to apply without the previous commit(s), let's revert it for now, apply previous patches, and re-apply it without modifications on top. Additionally, when I cherry-picked a62fef58299562aa, it somehow lost its original authorship (Qian Wen). So this revert fixes both issues. Signed-off-by: Michael Tokarev <m...@tls.msk.ru> diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b768d8ea33..46619288ed 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6835,8 +6835,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, } *edx = env->features[FEAT_1_EDX]; if (threads_per_pkg > 1) { - /* Fixup overflow: max value for bits 23-16 is 255. */ - *ebx |= MIN(threads_per_pkg, 255) << 16; + *ebx |= threads_per_pkg << 16; } if (!cpu->enable_pmu) { *ecx &= ~CPUID_EXT_PDCM; -- 2.47.2