]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390: provide I/O subsystem reset
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 25 Jul 2013 14:37:37 +0000 (16:37 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 30 Aug 2013 10:49:30 +0000 (12:49 +0200)
Provide a function that resets the I/O subsystem.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Alexander Graf <agraf@suse.de>
hw/s390x/s390-virtio-ccw.c
target-s390x/cpu.h

index aebbbf1755d989b4628cffdfa31e2b54ff0a71a0..8fd46a92c9d7d26b796d96f87a29b9c1c775ba67 100644 (file)
 #include "css.h"
 #include "virtio-ccw.h"
 
+void io_subsystem_reset(void)
+{
+    DeviceState *css, *sclp;
+
+    css = DEVICE(object_resolve_path_type("", "virtual-css-bridge", NULL));
+    if (css) {
+        qdev_reset_all(css);
+    }
+    sclp = DEVICE(object_resolve_path_type("",
+                  "s390-sclp-event-facility", NULL));
+    if (sclp) {
+        qdev_reset_all(sclp);
+    }
+}
+
 static int virtio_ccw_hcall_notify(const uint64_t *args)
 {
     uint64_t subch_id = args[0];
index 0878ab667808d673b6e2ffd9fa5b78fb56262c90..af9de5ed0b90516f0e88e13b5a944ef3c2c675ee 100644 (file)
@@ -400,6 +400,7 @@ void cpu_unlock(void);
 typedef struct SubchDev SubchDev;
 
 #ifndef CONFIG_USER_ONLY
+extern void io_subsystem_reset(void);
 SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid,
                          uint16_t schid);
 bool css_subch_visible(SubchDev *sch);