-From 08cbc3ac32dfefc5557bf62ea230a10ad46083b1 Mon Sep 17 00:00:00 2001
+From ff496e015b9b53c2d49a0110d247223872d5a582 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/55] virtio-balloon: fix query
+Subject: [PATCH 06/41] 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 d510236..fe80757 100644
+index cc2056e..aa1395d 100644
--- a/hmp.c
+++ b/hmp.c
-@@ -686,7 +686,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
+@@ -704,7 +704,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 9dbe681..50b20f1 100644
+index 5af429a..d87b971 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
-@@ -379,8 +379,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
+@@ -376,8 +376,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 54634c4..639f7b6 100644
+index 5658723..4bf7222 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
-@@ -1217,10 +1217,29 @@
+@@ -1278,10 +1278,29 @@
#
# @actual: the number of bytes the balloon currently contains
#
##
# @query-balloon:
diff --git a/qmp-commands.hx b/qmp-commands.hx
-index de896a5..9388578 100644
+index 6866264..6de28d4 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
-@@ -3815,6 +3815,13 @@ Make an asynchronous request for balloon info. When the request completes a
+@@ -3854,6 +3854,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:
-@@ -3822,6 +3829,12 @@ Example:
+@@ -3861,6 +3868,12 @@ Example:
<- {
"return":{
"actual":1073741824,