Skip to content

Commit ca3ba2a

Browse files
jasowangH. Peter Anvin
authored andcommitted
x86, hyperv: Bypass the timer_irq_works() check
This patch bypass the timer_irq_works() check for hyperv guest since: - It was guaranteed to work. - timer_irq_works() may fail sometime due to the lpj calibration were inaccurate in a hyperv guest or a buggy host. In the future, we should get the tsc frequency from hypervisor and use preset lpj instead. [ hpa: I would prefer to not defer things to "the future" in the future... ] Cc: K. Y. Srinivasan <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: <[email protected]> Acked-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Jason Wang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
1 parent b098d67 commit ca3ba2a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/x86/kernel/cpu/mshyperv.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <asm/irq_regs.h>
2727
#include <asm/i8259.h>
2828
#include <asm/apic.h>
29+
#include <asm/timer.h>
2930

3031
struct ms_hyperv_info ms_hyperv;
3132
EXPORT_SYMBOL_GPL(ms_hyperv);
@@ -105,6 +106,11 @@ static void __init ms_hyperv_init_platform(void)
105106

106107
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
107108
clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100);
109+
110+
#ifdef CONFIG_X86_IO_APIC
111+
no_timer_check = 1;
112+
#endif
113+
108114
}
109115

110116
const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {

0 commit comments

Comments
 (0)