diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/watchdog.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index df30ee08bdd4..e5e1d85b8c7c 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/sysctl.h> | 24 | #include <linux/sysctl.h> |
25 | 25 | ||
26 | #include <asm/irq_regs.h> | 26 | #include <asm/irq_regs.h> |
27 | #include <linux/kvm_para.h> | ||
27 | #include <linux/perf_event.h> | 28 | #include <linux/perf_event.h> |
28 | 29 | ||
29 | int watchdog_enabled = 1; | 30 | int watchdog_enabled = 1; |
@@ -280,6 +281,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) | |||
280 | __this_cpu_write(softlockup_touch_sync, false); | 281 | __this_cpu_write(softlockup_touch_sync, false); |
281 | sched_clock_tick(); | 282 | sched_clock_tick(); |
282 | } | 283 | } |
284 | |||
285 | /* Clear the guest paused flag on watchdog reset */ | ||
286 | kvm_check_and_clear_guest_paused(); | ||
283 | __touch_watchdog(); | 287 | __touch_watchdog(); |
284 | return HRTIMER_RESTART; | 288 | return HRTIMER_RESTART; |
285 | } | 289 | } |
@@ -292,6 +296,14 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) | |||
292 | */ | 296 | */ |
293 | duration = is_softlockup(touch_ts); | 297 | duration = is_softlockup(touch_ts); |
294 | if (unlikely(duration)) { | 298 | if (unlikely(duration)) { |
299 | /* | ||
300 | * If a virtual machine is stopped by the host it can look to | ||
301 | * the watchdog like a soft lockup, check to see if the host | ||
302 | * stopped the vm before we issue the warning | ||
303 | */ | ||
304 | if (kvm_check_and_clear_guest_paused()) | ||
305 | return HRTIMER_RESTART; | ||
306 | |||
295 | /* only warn once */ | 307 | /* only warn once */ |
296 | if (__this_cpu_read(soft_watchdog_warn) == true) | 308 | if (__this_cpu_read(soft_watchdog_warn) == true) |
297 | return HRTIMER_RESTART; | 309 | return HRTIMER_RESTART; |