summary refs log tree commit diff stats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorAnthony Liguori <anthony@codemonkey.ws>2010-11-19 18:55:59 +0900
committerMichael S. Tsirkin <mst@redhat.com>2010-11-22 10:00:07 +0200
commitec990eb622ad46df5ddcb1e94c418c271894d416 (patch)
treee70d39d0b76d8179a3aff43abc1e31da021194d2 /hw/qdev.h
parent81699d8a90deac361e9e14fd853f8341f40b2fad (diff)
downloadfocaccia-qemu-ec990eb622ad46df5ddcb1e94c418c271894d416.tar.gz
focaccia-qemu-ec990eb622ad46df5ddcb1e94c418c271894d416.zip
qdev: reset qdev along with qdev tree
This patch changes the reset handling so that qdev has no knowledge of the
global system reset.  Instead, a new bus/device level function is introduced
that allows all devices/buses on the bus/device to be reset using a depth
first transversal.

N.B. we have to expose the implicit system bus because we have various hacks
that result in an implicit system bus existing.  Instead, we ought to have an
explicitly created system bus that we can trigger reset from.  That's a topic
for a future patch though.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 550fd9bbdc..e5ed3333a2 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -187,10 +187,14 @@ int qbus_walk_children(BusState *bus, qdev_walkerfn *devfn,
                        qbus_walkerfn *busfn, void *opaque);
 int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
                        qbus_walkerfn *busfn, void *opaque);
+void qbus_reset_all(BusState *bus);
 void qbus_free(BusState *bus);
 
 #define FROM_QBUS(type, dev) DO_UPCAST(type, qbus, dev)
 
+/* This should go away once we get rid of the NULL bus hack */
+BusState *sysbus_get_default(void);
+
 /*** monitor commands ***/
 
 void do_info_qtree(Monitor *mon);