]> git.proxmox.com Git - pve-qemu.git/blobdiff - debian/patches/pve/0014-PVE-virtio-balloon-improve-query-balloon.patch
Update and rebase to QEMU 4.1
[pve-qemu.git] / debian / patches / pve / 0014-PVE-virtio-balloon-improve-query-balloon.patch
index 8f6470a799b06f2af71246b471eeb213dc798758..baf876419385e3e468e6986289d37a8100e377d4 100644 (file)
@@ -8,54 +8,13 @@ command.
 
 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
 ---
- hmp.c                      | 30 +++++++++++++++++++++++++++++-
  hw/virtio/virtio-balloon.c | 33 +++++++++++++++++++++++++++++++--
+ monitor/hmp-cmds.c         | 30 +++++++++++++++++++++++++++++-
  qapi/misc.json             | 22 +++++++++++++++++++++-
  3 files changed, 81 insertions(+), 4 deletions(-)
 
-diff --git a/hmp.c b/hmp.c
-index 8eec768088..25fe18cbcf 100644
---- a/hmp.c
-+++ b/hmp.c
-@@ -863,7 +863,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
-         return;
-     }
--    monitor_printf(mon, "balloon: actual=%" PRId64 "\n", info->actual >> 20);
-+    monitor_printf(mon, "balloon: actual=%" PRId64, info->actual >> 20);
-+    monitor_printf(mon, " max_mem=%" PRId64, info->max_mem >> 20);
-+    if (info->has_total_mem) {
-+        monitor_printf(mon, " total_mem=%" PRId64, info->total_mem >> 20);
-+    }
-+    if (info->has_free_mem) {
-+        monitor_printf(mon, " free_mem=%" PRId64, info->free_mem >> 20);
-+    }
-+
-+    if (info->has_mem_swapped_in) {
-+        monitor_printf(mon, " mem_swapped_in=%" PRId64, info->mem_swapped_in);
-+    }
-+    if (info->has_mem_swapped_out) {
-+        monitor_printf(mon, " mem_swapped_out=%" PRId64, info->mem_swapped_out);
-+    }
-+    if (info->has_major_page_faults) {
-+        monitor_printf(mon, " major_page_faults=%" PRId64,
-+                       info->major_page_faults);
-+    }
-+    if (info->has_minor_page_faults) {
-+        monitor_printf(mon, " minor_page_faults=%" PRId64,
-+                       info->minor_page_faults);
-+    }
-+    if (info->has_last_update) {
-+        monitor_printf(mon, " last_update=%" PRId64,
-+                       info->last_update);
-+    }
-+
-+    monitor_printf(mon, "\n");
-     qapi_free_BalloonInfo(info);
- }
 diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
-index adde97fe4b..e7f91a3cec 100644
+index 25de154307..7c09716035 100644
 --- a/hw/virtio/virtio-balloon.c
 +++ b/hw/virtio/virtio-balloon.c
 @@ -712,8 +712,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
@@ -98,11 +57,52 @@ index adde97fe4b..e7f91a3cec 100644
  }
  
  static void virtio_balloon_to_target(void *opaque, ram_addr_t target)
+diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
+index 5ca3ebe942..1b32c59329 100644
+--- a/monitor/hmp-cmds.c
++++ b/monitor/hmp-cmds.c
+@@ -870,7 +870,35 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
+         return;
+     }
+-    monitor_printf(mon, "balloon: actual=%" PRId64 "\n", info->actual >> 20);
++    monitor_printf(mon, "balloon: actual=%" PRId64, info->actual >> 20);
++    monitor_printf(mon, " max_mem=%" PRId64, info->max_mem >> 20);
++    if (info->has_total_mem) {
++        monitor_printf(mon, " total_mem=%" PRId64, info->total_mem >> 20);
++    }
++    if (info->has_free_mem) {
++        monitor_printf(mon, " free_mem=%" PRId64, info->free_mem >> 20);
++    }
++
++    if (info->has_mem_swapped_in) {
++        monitor_printf(mon, " mem_swapped_in=%" PRId64, info->mem_swapped_in);
++    }
++    if (info->has_mem_swapped_out) {
++        monitor_printf(mon, " mem_swapped_out=%" PRId64, info->mem_swapped_out);
++    }
++    if (info->has_major_page_faults) {
++        monitor_printf(mon, " major_page_faults=%" PRId64,
++                       info->major_page_faults);
++    }
++    if (info->has_minor_page_faults) {
++        monitor_printf(mon, " minor_page_faults=%" PRId64,
++                       info->minor_page_faults);
++    }
++    if (info->has_last_update) {
++        monitor_printf(mon, " last_update=%" PRId64,
++                       info->last_update);
++    }
++
++    monitor_printf(mon, "\n");
+     qapi_free_BalloonInfo(info);
+ }
 diff --git a/qapi/misc.json b/qapi/misc.json
-index 8b3ca4fdd3..c98bb4b559 100644
+index a7fba7230c..2445c950cc 100644
 --- a/qapi/misc.json
 +++ b/qapi/misc.json
-@@ -682,10 +682,30 @@
+@@ -408,10 +408,30 @@
  #
  # @actual: the number of bytes the balloon currently contains
  #