target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT
commit027ac0cb516cca4ce8a88dcca2f759c77e0e374b
authorVladislav Yaroshchuk <yaroshchuk2000@gmail.com>
Wed, 13 Jan 2021 20:53:23 +0000 (13 23:53 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Feb 2021 16:15:39 +0000 (16 17:15 +0100)
treedee713b396e3d9bfcd0b6b8c869c79129ecc4fc5
parent45f918ccf6c35ee1912a8847873b7ba5b6927b46
target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT

Some guests (ex. Darwin-XNU) can attemp to read this MSR to retrieve and
validate CPU topology comparing it to ACPI MADT content

MSR description from Intel Manual:
35H: MSR_CORE_THREAD_COUNT: Configured State of Enabled Processor Core
  Count and Logical Processor Count

Bits 15:0 THREAD_COUNT The number of logical processors that are
  currently enabled in the physical package

Bits 31:16 Core_COUNT The number of processor cores that are currently
  enabled in the physical package

Bits 63:32 Reserved

Signed-off-by: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
Message-Id: <20210113205323.33310-1-yaroshchuk2000@gmail.com>
[RB: reordered MSR definition and dropped u suffix from shift offset]
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.h
target/i386/hvf/x86_emu.c