From 96637bcdf9e00db77265229d3d30d952bdde74be Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 21 Oct 2011 11:41:37 -0200 Subject: qapi: Convert query-balloon Please, note that some of the code supporting memory statistics is still around (eg. virtio_balloon_receive_stats() and reset_stats()). Also, the qmp_query_balloon() function is synchronous and thus doesn't make any use of the (not fully working) monitor's asynchronous command support (the old non-qapi implementation did). Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qapi-schema.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 087a46305e..b2814cd510 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -658,6 +658,50 @@ ## { 'command': 'query-spice', 'returns': 'SpiceInfo' } +## +# @BalloonInfo: +# +# Information about the guest balloon device. +# +# @actual: the number of bytes the balloon currently contains +# +# @mem_swapped_in: #optional number of pages swapped in within the guest +# +# @mem_swapped_out: #optional number of pages swapped out within the guest +# +# @major_page_faults: #optional number of major page faults within the guest +# +# @minor_page_faults: #optional number of minor page faults within the guest +# +# @free_mem: #optional amount of memory (in bytes) free in the guest +# +# @total_mem: #optional amount of memory (in bytes) visible to the guest +# +# Since: 0.14.0 +# +# Notes: all current versions of QEMU do not fill out optional information in +# this structure. +## +{ 'type': 'BalloonInfo', + 'data': {'actual': 'int', '*mem_swapped_in': 'int', + '*mem_swapped_out': 'int', '*major_page_faults': 'int', + '*minor_page_faults': 'int', '*free_mem': 'int', + '*total_mem': 'int'} } + +## +# @query-balloon: +# +# Return information about the balloon device. +# +# Returns: @BalloonInfo on success +# If the balloon driver is enabled but not functional because the KVM +# kernel module cannot support it, KvmMissingCap +# If no balloon device is present, DeviceNotActive +# +# Since: 0.14.0 +## +{ 'command': 'query-balloon', 'returns': 'BalloonInfo' } + ## # @quit: # -- cgit v1.2.3-55-g7522