summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-virtio-ccw.c
diff options
context:
space:
mode:
authorXu Wang2015-06-29 08:21:10 +0200
committerCornelia Huck2015-07-14 19:10:03 +0200
commit0c7322cfd3fd382c0096c2a9f00775818a878e13 (patch)
tree14723ea2d379361004c155a11d8b6ece4db47600 /hw/s390x/s390-virtio-ccw.c
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150714-1' into s... (diff)
downloadqemu-0c7322cfd3fd382c0096c2a9f00775818a878e13.tar.gz
qemu-0c7322cfd3fd382c0096c2a9f00775818a878e13.tar.xz
qemu-0c7322cfd3fd382c0096c2a9f00775818a878e13.zip
watchdog/diag288: correctly register for system reset requests
The diag288 watchdog is no sysbus device, therefore it doesn't get triggered on resets automatically using dc->reset. Let's register the reset handler manually, so we get correctly notified again when a system reset was requested. Also reset the watchdog on subsystem resets that don't trigger a full system reset. Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/s390x/s390-virtio-ccw.c')
-rw-r--r--hw/s390x/s390-virtio-ccw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3d20d6a0f7..4c51d1a5bd 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -36,7 +36,7 @@ typedef struct S390CcwMachineState {
void io_subsystem_reset(void)
{
- DeviceState *css, *sclp, *flic;
+ DeviceState *css, *sclp, *flic, *diag288;
css = DEVICE(object_resolve_path_type("", "virtual-css-bridge", NULL));
if (css) {
@@ -51,6 +51,10 @@ void io_subsystem_reset(void)
if (flic) {
qdev_reset_all(flic);
}
+ diag288 = DEVICE(object_resolve_path_type("", "diag288", NULL));
+ if (diag288) {
+ qdev_reset_all(diag288);
+ }
}
static int virtio_ccw_hcall_notify(const uint64_t *args)