diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-11-19 18:56:01 +0900 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-11-22 10:00:07 +0200 |
commit | 5af0a04bea1f1704432b7c118c00a466e862bf00 (patch) | |
tree | cadd0eaaeb25d23e4382a0eeb4f0f0236067825b /hw/qdev.c | |
parent | b4694b7ce8bd87c4b9c6c14ad74075a31b15c784 (diff) | |
download | qemu-5af0a04bea1f1704432b7c118c00a466e862bf00.zip qemu-5af0a04bea1f1704432b7c118c00a466e862bf00.tar.gz qemu-5af0a04bea1f1704432b7c118c00a466e862bf00.tar.bz2 |
qdev: trigger reset from a given device
Introduce a helper function which triggers reset from a given device.
Will be used by pci bus emulation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r-- | hw/qdev.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -322,6 +322,11 @@ static int qbus_reset_one(BusState *bus, void *opaque) return 0; } +void qdev_reset_all(DeviceState *dev) +{ + qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL); +} + void qbus_reset_all(BusState *bus) { qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL); |