-From f447be06707ec553c22a1f364b5a93e49409084f Mon Sep 17 00:00:00 2001
+From 08cbc3ac32dfefc5557bf62ea230a10ad46083b1 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
Date: Wed, 9 Dec 2015 14:27:49 +0100
-Subject: [PATCH 06/41] virtio-balloon: fix query
+Subject: [PATCH 06/55] virtio-balloon: fix query
Actually provide memory information via the query-balloon
command.
4 files changed, 94 insertions(+), 5 deletions(-)
diff --git a/hmp.c b/hmp.c
-index 2140605..0e63ea8 100644
+index d510236..fe80757 100644
--- a/hmp.c
+++ b/hmp.c
-@@ -676,7 +676,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
+@@ -686,7 +686,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
return;
}
qapi_free_BalloonInfo(info);
}
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
-index 9671635..369c856 100644
+index 9dbe681..50b20f1 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
-@@ -324,8 +324,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
+@@ -379,8 +379,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
static void virtio_balloon_stat(void *opaque, BalloonInfo *info)
{
VirtIOBalloon *dev = opaque;
static void virtio_balloon_to_target(void *opaque, ram_addr_t target)
diff --git a/qapi-schema.json b/qapi-schema.json
-index 8b1a423..9f54ebf 100644
+index 54634c4..639f7b6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
-@@ -1145,10 +1145,29 @@
+@@ -1217,10 +1217,29 @@
#
# @actual: the number of bytes the balloon currently contains
#
##
# @query-balloon:
diff --git a/qmp-commands.hx b/qmp-commands.hx
-index 20a92f9..5c23d91 100644
+index de896a5..9388578 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
-@@ -3708,6 +3708,13 @@ Make an asynchronous request for balloon info. When the request completes a
+@@ -3815,6 +3815,13 @@ Make an asynchronous request for balloon info. When the request completes a
json-object will be returned containing the following data:
- "actual": current balloon value in bytes (json-int)
Example:
-@@ -3715,6 +3722,12 @@ Example:
+@@ -3822,6 +3829,12 @@ Example:
<- {
"return":{
"actual":1073741824,