aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-balloon.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-10-05 13:54:49 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-10-05 13:54:49 -0500
commit48f57044e6a826329ebcac5d5a76d776a14e5d43 (patch)
treecc99327c9a0d496ed0c400a31c919b517f9d09f4 /hw/virtio-balloon.c
parente0c8a796d522b80c21b005a19610829c4be2154f (diff)
parenta18b2ce2ed9dc747c2ebab5a220517624e4ff3df (diff)
Merge remote branch 'qmp/for-anthony' into staging
Diffstat (limited to 'hw/virtio-balloon.c')
-rw-r--r--hw/virtio-balloon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 1e746741ff..8adddeaa53 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -29,6 +29,10 @@
#include <sys/mman.h>
#endif
+/* Disable guest-provided stats by now (https://bugzilla.redhat.com/show_bug.cgi?id=623903) */
+#define ENABLE_GUEST_STATS 0
+
+
typedef struct VirtIOBalloon
{
VirtIODevice vdev;
@@ -83,12 +87,14 @@ static QObject *get_stats_qobject(VirtIOBalloon *dev)
VIRTIO_BALLOON_PFN_SHIFT);
stat_put(dict, "actual", actual);
+#if ENABLE_GUEST_STATS
stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
+#endif
return QOBJECT(dict);
}
@@ -214,7 +220,7 @@ static void virtio_balloon_to_target(void *opaque, ram_addr_t target,
}
dev->stats_callback = cb;
dev->stats_opaque_callback_data = cb_data;
- if (dev->vdev.guest_features & (1 << VIRTIO_BALLOON_F_STATS_VQ)) {
+ if (ENABLE_GUEST_STATS && (dev->vdev.guest_features & (1 << VIRTIO_BALLOON_F_STATS_VQ))) {
virtqueue_push(dev->svq, &dev->stats_vq_elem, dev->stats_vq_offset);
virtio_notify(&dev->vdev, dev->svq);
} else {