aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2023-08-23 23:34:14 +0200
committerMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2023-11-06 14:08:10 +0100
commit259ebed45a2cd2ae6a5820fbc2e51578d2ad4eb7 (patch)
treeb79f2d9b57cdf58408a26880a23ce79836936e38 /qapi
parent16dff2f9bb877bd1e147b5c5d9966d5a1d336c8c (diff)
downloadqemu-259ebed45a2cd2ae6a5820fbc2e51578d2ad4eb7.zip
qemu-259ebed45a2cd2ae6a5820fbc2e51578d2ad4eb7.tar.gz
qemu-259ebed45a2cd2ae6a5820fbc2e51578d2ad4eb7.tar.bz2
qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command
Used by the hv-balloon driver for (optional) guest memory status reports. Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/machine.json62
1 files changed, 62 insertions, 0 deletions
diff --git a/qapi/machine.json b/qapi/machine.json
index 2985d04..b6d634b 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1138,6 +1138,68 @@
'data': { 'actual': 'int' } }
##
+# @HvBalloonInfo:
+#
+# hv-balloon guest-provided memory status information.
+#
+# @committed: the amount of memory in use inside the guest plus the
+# amount of the memory unusable inside the guest (ballooned out,
+# offline, etc.)
+#
+# @available: the amount of the memory inside the guest available for
+# new allocations ("free")
+#
+# Since: 8.2
+##
+{ 'struct': 'HvBalloonInfo',
+ 'data': { 'committed': 'size', 'available': 'size' } }
+
+##
+# @query-hv-balloon-status-report:
+#
+# Returns the hv-balloon driver data contained in the last received "STATUS"
+# message from the guest.
+#
+# Returns:
+# - @HvBalloonInfo on success
+# - If no hv-balloon device is present, guest memory status reporting
+# is not enabled or no guest memory status report received yet,
+# GenericError
+#
+# Since: 8.2
+#
+# Example:
+#
+# -> { "execute": "query-hv-balloon-status-report" }
+# <- { "return": {
+# "committed": 816640000,
+# "available": 3333054464
+# }
+# }
+##
+{ 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
+
+##
+# @HV_BALLOON_STATUS_REPORT:
+#
+# Emitted when the hv-balloon driver receives a "STATUS" message from
+# the guest.
+#
+# Note: this event is rate-limited.
+#
+# Since: 8.2
+#
+# Example:
+#
+# <- { "event": "HV_BALLOON_STATUS_REPORT",
+# "data": { "committed": 816640000, "available": 3333054464 },
+# "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
+#
+##
+{ 'event': 'HV_BALLOON_STATUS_REPORT',
+ 'data': 'HvBalloonInfo' }
+
+##
# @MemoryInfo:
#
# Actual memory information in bytes.