qdev: reset qdev along with qdev tree
authorAnthony Liguori <anthony@codemonkey.ws>
Fri, 19 Nov 2010 09:55:59 +0000 (18:55 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 22 Nov 2010 08:00:07 +0000 (10:00 +0200)
commite15e5cf9340a6213fb0537e1775a91f927a00fcf
treee70d39d0b76d8179a3aff43abc1e31da021194d2
parent937e5ba153fe973a4df8dbc66847238a32c0c878
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>
hw/qdev.c
hw/qdev.h
vl.c