Commit fba9110f authored by Bo Tu's avatar Bo Tu Committed by Cornelia Huck
Browse files

watchdog/diag288: don't reset for action=none|debug|pause



If the watchdog expires and the guest is not notified (NONE, DEBUG, PAUSE),
we must not reset the watchdog device, otherwise watchdog_ping() and
watchdog_stop() will fail when triggered by the guest. This reset behavior
matches to the z/VM behavior when a custom command is to be executed
on expiry.

Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarBo Tu <tubo@linux.vnet.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent 0d035b6c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);
}