summaryrefslogtreecommitdiff
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorBandan Das <bsd@redhat.com>2013-11-25 17:48:40 -0500
committerAndreas Färber <afaerber@suse.de>2014-03-13 01:21:57 +0100
commit02e7f85dac3c639b70460ce557cb6c29963db97a (patch)
treec41999ae07075f934d0602098b58a13214c0be3e /include/hw/qdev-core.h
parent04e9a20b495f37f3132f4ada80fd925b4794b253 (diff)
downloadqemu-02e7f85dac3c639b70460ce557cb6c29963db97a.tar.gz
qemu-02e7f85dac3c639b70460ce557cb6c29963db97a.tar.bz2
qemu-02e7f85dac3c639b70460ce557cb6c29963db97a.zip
qdev: Prepare realize/unrealize hooks for BusState
Add a "realized" property calling realize/unrealize hooks as for devices. Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 1ed0691716..dbe473c344 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -36,6 +36,8 @@ typedef int (*qdev_event)(DeviceState *dev);
typedef void (*qdev_resetfn)(DeviceState *dev);
typedef void (*DeviceRealize)(DeviceState *dev, Error **errp);
typedef void (*DeviceUnrealize)(DeviceState *dev, Error **errp);
+typedef void (*BusRealize)(BusState *bus, Error **errp);
+typedef void (*BusUnrealize)(BusState *bus, Error **errp);
struct VMStateDescription;
@@ -174,6 +176,9 @@ struct BusClass {
*/
char *(*get_fw_dev_path)(DeviceState *dev);
void (*reset)(BusState *bus);
+ BusRealize realize;
+ BusUnrealize unrealize;
+
/* maximum devices allowed on the bus, 0: no limit. */
int max_dev;
/* number of automatically allocated bus ids (e.g. ide.0) */
@@ -199,6 +204,7 @@ struct BusState {
int allow_hotplug;
HotplugHandler *hotplug_handler;
int max_index;
+ bool realized;
QTAILQ_HEAD(ChildrenHead, BusChild) children;
QLIST_ENTRY(BusState) sibling;
};