[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/10] watchdog/diag288: don't reset for action=none|
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 07/10] watchdog/diag288: don't reset for action=none|debug|pause |
Date: |
Thu, 28 Jan 2016 12:09:08 +0100 |
From: Bo Tu <address@hidden>
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: David Hildenbrand <address@hidden>
Signed-off-by: Bo Tu <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/watchdog/wdt_diag288.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
index 2a885a4..ddda723 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);
}
--
2.7.0
- [Qemu-devel] [PULL 00/10] next round of s390x patches, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 02/10] s390x/machine: make addon register fields static, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 01/10] s390x/skeys: Fix instance and class size, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 03/10] s390x/sclp: add device to the sysbus in sclp_realize, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 06/10] watchdog: introduction of get_watchdog_action, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 08/10] s390x/css: fix control flags during csch, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 09/10] gdb: provide the name of the architecture in the target.xml, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 05/10] s390x: fix generation of event information crw, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 10/10] s390x: s390_cpu_get_phys_page_debug has to return -1, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 07/10] watchdog/diag288: don't reset for action=none|debug|pause,
Cornelia Huck <=
- [Qemu-devel] [PULL 04/10] s390x/ioinst: set type and len for SEI response, Cornelia Huck, 2016/01/28
- Re: [Qemu-devel] [PULL 00/10] next round of s390x patches, Peter Maydell, 2016/01/28