summary refs log tree commit diff stats
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-10-23 17:05:15 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-10-23 17:05:15 +0100
commit1430500bb8ba0bf15bad235439d62276c1b6b22f (patch)
tree12e69462ce386b5b2076adcf15a9229516502b92 /hw/core/qdev.c
parente40830afa1cff3ffdc37bdfdd40d80860074636c (diff)
parente799157c766d96506214059d8b75712a3e615431 (diff)
downloadfocaccia-qemu-1430500bb8ba0bf15bad235439d62276c1b6b22f.tar.gz
focaccia-qemu-1430500bb8ba0bf15bad235439d62276c1b6b22f.zip
Merge remote-tracking branch 'remotes/qmp-unstable/tags/for-upstream' into staging
QMP patches

# gpg: Signature made Thu 23 Oct 2014 16:05:52 BST using RSA key ID E24ED5A7
# gpg: Good signature from "Luiz Capitulino <lcapitulino@gmail.com>"

* remotes/qmp-unstable/tags/for-upstream:
  monitor: delete device_del_bus_completion
  monitor: add del completion for peripheral device
  qdev: add qdev_build_hotpluggable_device_list helper
  MAINTAINERS: add entry for qobject files
  dump: Turn some functions to void to make code cleaner
  dump: Propagate errors into qmp_dump_guest_memory()
  virtio-balloon: Tweak recent fix for integer overflow

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index a1e9247772..9357aba455 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -866,6 +866,19 @@ void qdev_alias_all_properties(DeviceState *target, Object *source)
     } while (class != object_class_by_name(TYPE_DEVICE));
 }
 
+int qdev_build_hotpluggable_device_list(Object *obj, void *opaque)
+{
+    GSList **list = opaque;
+    DeviceState *dev = DEVICE(obj);
+
+    if (dev->realized && object_property_get_bool(obj, "hotpluggable", NULL)) {
+        *list = g_slist_append(*list, dev);
+    }
+
+    object_child_foreach(obj, qdev_build_hotpluggable_device_list, opaque);
+    return 0;
+}
+
 static bool device_get_realized(Object *obj, Error **errp)
 {
     DeviceState *dev = DEVICE(obj);