aboutsummaryrefslogtreecommitdiff
path: root/hw
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
parente40830afa1cff3ffdc37bdfdd40d80860074636c (diff)
parente799157c766d96506214059d8b75712a3e615431 (diff)
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')
-rw-r--r--hw/core/qdev.c13
-rw-r--r--hw/virtio/virtio-balloon.c2
2 files changed, 14 insertions, 1 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);
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index b5cf7cacc0..7bfbb75ad3 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -170,7 +170,7 @@ static void balloon_stats_set_poll_interval(Object *obj, struct Visitor *v,
return;
}
- if (value > UINT_MAX) {
+ if (value > UINT32_MAX) {
error_setg(errp, "timer value is too big");
return;
}