Message ID | 20230829042405.932523-3-qian.wen@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix overflow of the max number of IDs for logic processor and core | expand |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index fc0437bdb1..90fe0a6a46 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -248,7 +248,7 @@ static void encode_cache_cpuid4(CPUCacheInfo *cache, *eax = CACHE_TYPE(cache->type) | CACHE_LEVEL(cache->level) | (cache->self_init ? CACHE_SELF_INIT_LEVEL : 0) | - ((num_cores - 1) << 26) | + ((MIN(num_cores, 64) - 1) << 26) | ((num_apic_ids - 1) << 14); assert(cache->line_size > 0);