x86/hyperv: Read TSC frequency from a synthetic MSR
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 22 Jun 2017 10:07:30 +0000 (18:07 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jun 2017 13:35:12 +0000 (15:35 +0200)
commit71c2a2d0a81f096a2932fccb39a500116fece554
tree0d633df9e9084d3f46b1cfea517c3f36165a6eca
parent2cf0284223a40773bd0ec76a409a7cbf0607ca28
x86/hyperv: Read TSC frequency from a synthetic MSR

It was found that SMI_TRESHOLD of 50000 is not enough for Hyper-V
guests in nested environment and falling back to counting jiffies
is not an option for Gen2 guests as they don't have PIT. As Hyper-V
provides TSC frequency in a synthetic MSR we can just use this information
instead of doing a error prone calibration.

Reported-and-tested-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Jork Loeser <jloeser@microsoft.com>
Cc: devel@linuxdriverproject.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Link: http://lkml.kernel.org/r/20170622100730.18112-3-vkuznets@redhat.com
arch/x86/kernel/cpu/mshyperv.c