Skip to contentSkip to conversation

x86/vmware: Skip timer_irq_works() check on VMware

PATCH New Renat Valiullin 2 participants 2 messages Oct 13, 2016 – Oct 19, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/vmware: Skip timer_irq_works() check on VMware

The timer_irq_works() boot check may sometimes fail in a VM, when the Host is overcommitted or when the Guest is running nested. Since the intended check is unnecessary on VMware's virtual hardware, this change by-passes it.

---
 arch/x86/kernel/cpu/vmware.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/x86/kernel/cpu/vmware.c +5 -0
index 8116057..5130985 100644
@@ -27,6 +27,7 @@
 #include <asm/div64.h>
 #include <asm/x86_init.h>
 #include <asm/hypervisor.h>
+#include <asm/timer.h>
 #include <asm/apic.h>
 
 #define CPUID_VMWARE_INFO_LEAF	0x40000000
@@ -94,6 +95,10 @@ static void __init vmware_platform_setup(void)
 	} else {
 		pr_warn("Failed to get TSC freq from the hypervisor\n");
 	}
+
+#ifdef CONFIG_X86_IO_APIC
+	no_timer_check = 1;
+#endif
 }
 
 /*
Signature · 1 line
2.7.4
#1 lore raw
x86/vmware: Skip timer_irq_works() check on VMware
Commit-ID:  854dd54245f7f1b1175b1bada613929396a571be
Gitweb:     http://git.kernel.org/tip/854dd54245f7f1b1175b1bada613929396a571be
Author:     Renat Valiullin <[email protected]>
AuthorDate: Thu, 13 Oct 2016 11:45:39 -0700
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 19 Oct 2016 17:36:33 +0200

x86/vmware: Skip timer_irq_works() check on VMware

The timer_irq_works() boot check may sometimes fail in a VM, when the Host is overcommitted or when the Guest is running nested.

Since the intended check is unnecessary on VMware's virtual hardware, by-pass it.

---
 arch/x86/kernel/cpu/vmware.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/x86/kernel/cpu/vmware.c +5 -0
index 8116057..5130985 100644
@@ -27,6 +27,7 @@
 #include <asm/div64.h>
 #include <asm/x86_init.h>
 #include <asm/hypervisor.h>
+#include <asm/timer.h>
 #include <asm/apic.h>
 
 #define CPUID_VMWARE_INFO_LEAF	0x40000000
@@ -94,6 +95,10 @@ static void __init vmware_platform_setup(void)
 	} else {
 		pr_warn("Failed to get TSC freq from the hypervisor\n");
 	}
+
+#ifdef CONFIG_X86_IO_APIC
+	no_timer_check = 1;
+#endif
 }
 
 /*