]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: hyperv: support HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY
authorLadi Prosek <lprosek@redhat.com>
Wed, 26 Jul 2017 11:32:59 +0000 (13:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Aug 2017 13:26:06 +0000 (15:26 +0200)
commitd06dba985db2b40a1c515f8f0e7a07f2c110e299
tree2661bf0f4153e7e302c78f1a849049db1b15a6e5
parent1b97f15d622ae0aa1e9cf95d3fbb2c4720b23cb7
KVM: hyperv: support HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY

It has been experimentally confirmed that supporting these two MSRs is one
of the necessary conditions for nested Hyper-V to use the TSC page. Modern
Windows guests are noticeably slower when they fall back to reading
timestamps from the HV_X64_MSR_TIME_REF_COUNT MSR instead of using the TSC
page.

The newly supported MSRs are advertised with the AccessFrequencyRegs
partition privilege flag and CPUID.40000003H:EDX[8] "Support for
determining timer frequencies is available" (both outside of the scope of
this KVM patch).

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c