diff --git a/vl.c b/vl.c
index b3e3676..5de1688 100644
--- a/vl.c
+++ b/vl.c
@@ -2968,6 +2968,9 @@ int main(int argc, char **argv, char **envp)
}
qemu_system_reset();
+
+ qemu_register_reset((void *)qbus_reset_all, sysbus_get_default());
+
This is inconsistent with qdev_create(). qdev_create() uses null.
I agree with the N.B. in your commit message: the root of the tree
should be explicit. Implicit is too much magic. But you create a
second kind of magic. I don't object to how that works, only to having
two different kinds.
I'd suggest you either make your qemu_reset_all() work like existing
qdev_create(), i.e. null means root. Or change qdev_create() to work
like your qemu_reset_all(), i.e. use sysbus_get_default() instead of
null.