Skip to content

Commit

Permalink
kvm: ensure hard lockup detection is disabled by default
Browse files Browse the repository at this point in the history
Use watchdog_enable_hardlockup_detector() to set hard lockup detection's
default value to false.  It's risky to run this detection in a guest, as
false positives are easy to trigger, especially if the host is
overcommitted.

Signed-off-by: Ulrich Obergfell <[email protected]>
Signed-off-by: Andrew Jones <[email protected]>
Signed-off-by: Don Zickus <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rh-ulrich-o authored and torvalds committed Oct 14, 2014
1 parent 6e7458a commit 9919e39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <linux/slab.h>
#include <linux/kprobes.h>
#include <linux/debugfs.h>
#include <linux/nmi.h>
#include <asm/timer.h>
#include <asm/cpu.h>
#include <asm/traps.h>
Expand Down Expand Up @@ -499,6 +500,13 @@ void __init kvm_guest_init(void)
#else
kvm_guest_cpu_init();
#endif

/*
* Hard lockup detection is enabled by default. Disable it, as guests
* can get false positives too easily, for example if the host is
* overcommitted.
*/
watchdog_enable_hardlockup_detector(false);
}

static noinline uint32_t __kvm_cpuid_base(void)
Expand Down

0 comments on commit 9919e39

Please sign in to comment.