diff options
Diffstat (limited to 'target/i386/cpu-system.c')
| -rw-r--r-- | target/i386/cpu-system.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/i386/cpu-system.c b/target/i386/cpu-system.c index 9d007afdab..b56a2821af 100644 --- a/target/i386/cpu-system.c +++ b/target/i386/cpu-system.c @@ -309,3 +309,14 @@ void x86_cpu_get_crash_info_qom(Object *obj, Visitor *v, errp); qapi_free_GuestPanicInformation(panic_info); } + +uint64_t cpu_x86_get_msr_core_thread_count(X86CPU *cpu) +{ + CPUX86State *env = &cpu->env; + uint64_t val; + + val = x86_threads_per_pkg(&env->topo_info); /* thread count, bits 15..0 */ + val |= x86_cores_per_pkg(&env->topo_info) << 16; /* core count, bits 31..16 */ + + return val; +} |