[PATCH 0/3] Add TCG & KVM support for MSR_CORE_THREAD_COUNT

Alexander Graf posted 3 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221004225643.65036-1-agraf@csgraf.de
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
target/i386/kvm/kvm.c                | 145 +++++++++++++++++++++++++++
target/i386/kvm/kvm_i386.h           |  11 ++
target/i386/tcg/sysemu/misc_helper.c |   5 +
3 files changed, 161 insertions(+)
[PATCH 0/3] Add TCG & KVM support for MSR_CORE_THREAD_COUNT
Posted by Alexander Graf 1 year, 6 months ago
Commit 027ac0cb516 ("target/i386/hvf: add rdmsr 35H
MSR_CORE_THREAD_COUNT") added support for the MSR_CORE_THREAD_COUNT MSR
to HVF. This MSR is mandatory to execute macOS when run with -cpu
host,+hypervisor.

This patch set adds support for the very same MSR to TCG as well as
KVM - as long as host KVM is recent enough to support MSR trapping.

With this support added, I can successfully execute macOS guests in
KVM with an APFS enabled OVMF build, a valid applesmc plus OSK and

  -cpu Skylake-Client,+invtsc,+hypervisor


Alex

Alexander Graf (3):
  x86: Implement MSR_CORE_THREAD_COUNT MSR
  i386: kvm: Add support for MSR filtering
  KVM: x86: Implement MSR_CORE_THREAD_COUNT MSR

 target/i386/kvm/kvm.c                | 145 +++++++++++++++++++++++++++
 target/i386/kvm/kvm_i386.h           |  11 ++
 target/i386/tcg/sysemu/misc_helper.c |   5 +
 3 files changed, 161 insertions(+)

-- 
2.37.0 (Apple Git-136)
Re: [PATCH 0/3] Add TCG & KVM support for MSR_CORE_THREAD_COUNT
Posted by Paolo Bonzini 1 year, 6 months ago
On 10/5/22 00:56, Alexander Graf wrote:
> Commit 027ac0cb516 ("target/i386/hvf: add rdmsr 35H
> MSR_CORE_THREAD_COUNT") added support for the MSR_CORE_THREAD_COUNT MSR
> to HVF. This MSR is mandatory to execute macOS when run with -cpu
> host,+hypervisor.
> 
> This patch set adds support for the very same MSR to TCG as well as
> KVM - as long as host KVM is recent enough to support MSR trapping.
> 
> With this support added, I can successfully execute macOS guests in
> KVM with an APFS enabled OVMF build, a valid applesmc plus OSK and
> 
>    -cpu Skylake-Client,+invtsc,+hypervisor
> 
> 
> Alex
> 
> Alexander Graf (3):
>    x86: Implement MSR_CORE_THREAD_COUNT MSR
>    i386: kvm: Add support for MSR filtering
>    KVM: x86: Implement MSR_CORE_THREAD_COUNT MSR
> 
>   target/i386/kvm/kvm.c                | 145 +++++++++++++++++++++++++++
>   target/i386/kvm/kvm_i386.h           |  11 ++
>   target/i386/tcg/sysemu/misc_helper.c |   5 +
>   3 files changed, 161 insertions(+)
> 

Queued, thanks!

Paolo