From ec990eb622ad46df5ddcb1e94c418c271894d416 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Fri, 19 Nov 2010 18:55:59 +0900 Subject: 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 Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- vl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vl.c') diff --git a/vl.c b/vl.c index c58583d..135fdeb 100644 --- a/vl.c +++ b/vl.c @@ -2976,6 +2976,7 @@ int main(int argc, char **argv, char **envp) exit(1); } + qemu_register_reset((void *)qbus_reset_all, sysbus_get_default()); qemu_system_reset(); if (loadvm) { if (load_vmstate(loadvm) < 0) { -- cgit v1.1