1 From 88c9281a9fba67636ab26c1fd6afbc78a632374f Mon Sep 17 00:00:00 2001
2 From: Vitaly Kuznetsov <vkuznets@redhat.com>
3 Date: Wed, 19 Aug 2015 09:54:24 -0700
4 Subject: x86/hyperv: Mark the Hyper-V TSC as unstable
6 The Hyper-V top-level functional specification states, that
7 "algorithms should be resilient to sudden jumps forward or
8 backward in the TSC value", this means that we should consider
9 TSC as unstable. In some cases tsc tests are able to detect the
10 instability, it was detected in 543 out of 646 boots in my
13 Measured 6277 cycles TSC warp between CPUs, turning off TSC clock.
14 tsc: Marking TSC unstable due to check_tsc_sync_source failed
16 This is, however, just a heuristic. On Hyper-V platform there
17 are two good clocksources: MSR-based hyperv_clocksource and
18 recently introduced TSC page.
20 Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
21 Cc: Haiyang Zhang <haiyangz@microsoft.com>
22 Cc: K. Y. Srinivasan <kys@microsoft.com>
23 Cc: Linus Torvalds <torvalds@linux-foundation.org>
24 Cc: Peter Zijlstra <peterz@infradead.org>
25 Cc: Thomas Gleixner <tglx@linutronix.de>
26 Cc: devel@linuxdriverproject.org
27 Link: http://lkml.kernel.org/r/1440003264-9949-1-git-send-email-vkuznets@redhat.com
28 Signed-off-by: Ingo Molnar <mingo@kernel.org>
30 arch/x86/kernel/cpu/mshyperv.c | 1 +
31 1 file changed, 1 insertion(+)
33 diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
34 index aad4bd8..6fd023d 100644
35 --- a/arch/x86/kernel/cpu/mshyperv.c
36 +++ b/arch/x86/kernel/cpu/mshyperv.c
37 @@ -141,6 +141,7 @@ static void __init ms_hyperv_init_platform(void)
41 + mark_tsc_unstable("running on Hyper-V");
44 const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {