aboutsummaryrefslogtreecommitdiff
path: root/hw/watchdog/wdt_diag288.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/watchdog/wdt_diag288.c')
-rw-r--r--hw/watchdog/wdt_diag288.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
index 2a885a447c..ddda723906 100644
--- a/hw/watchdog/wdt_diag288.c
+++ b/hw/watchdog/wdt_diag288.c
@@ -51,6 +51,13 @@ static void diag288_timer_expired(void *dev)
{
qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n");
watchdog_perform_action();
+ /* Reset the watchdog only if the guest was notified about expiry. */
+ switch (get_watchdog_action()) {
+ case WDT_DEBUG:
+ case WDT_NONE:
+ case WDT_PAUSE:
+ return;
+ }
wdt_diag288_reset(dev);
}