x86: Implement MSR_CORE_THREAD_COUNT MSR
commit62a44fddb24fec35a6baf7e2c52b0e935a5bfa90
authorAlexander Graf <agraf@csgraf.de>
Tue, 4 Oct 2022 22:56:41 +0000 (5 00:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Oct 2022 07:36:01 +0000 (11 09:36 +0200)
tree354dea0d102d32456619975236027ee8b6cbc33c
parente3a79e0e87831602e41819591a8e6dcc70a2a231
x86: Implement MSR_CORE_THREAD_COUNT MSR

Intel CPUs starting with Haswell-E implement a new MSR called
MSR_CORE_THREAD_COUNT which exposes the number of threads and cores
inside of a package.

This MSR is used by XNU to populate internal data structures and not
implementing it prevents virtual machines with more than 1 vCPU from
booting if the emulated CPU generation is at least Haswell-E.

This patch propagates the existing hvf logic from patch 027ac0cb516
("target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT") to TCG.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Message-Id: <20221004225643.65036-2-agraf@csgraf.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/sysemu/misc_helper.c