From 1de81d2832e210dda43a101e4163a17bc4d9c71d Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 19 Dec 2011 16:37:46 -0600 Subject: qdev: fix hotplug when no -device is specified The peripheral[-anon] containers are initialized lazily but since they sit on sysbus, they can not be created after realize. This was causing an abort() to occur during hotplug if no -device option was used. This was spotted by qemu-test::device-add.sh Signed-off-by: Anthony Liguori --- hw/qdev.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/qdev.h') diff --git a/hw/qdev.h b/hw/qdev.h index d5896be40e..2abb767389 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -616,4 +616,12 @@ void qdev_property_add_str(DeviceState *dev, const char *name, */ char *qdev_get_type(DeviceState *dev, Error **errp); +/** + * @qdev_machine_init + * + * Initialize platform devices before machine init. This is a hack until full + * support for composition is added. + */ +void qdev_machine_init(void); + #endif -- cgit v1.2.3-55-g7522