From: Markus Armbruster <armbru@redhat.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"David Hildenbrand" <david@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v7 6/7] qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command
Date: Mon, 25 Sep 2023 13:49:36 +0200 [thread overview]
Message-ID: <87jzse79rj.fsf@pond.sub.org> (raw)
In-Reply-To: <03f58582c27a729ab305f8337ca2d2b8034bdd3b.1693240836.git.maciej.szmigiero@oracle.com> (Maciej S. Szmigiero's message of "Mon, 28 Aug 2023 18:48:23 +0200")
"Maciej S. Szmigiero" <mail@maciej.szmigiero.name> writes:
> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
>
> Used by the hv-balloon driver for (optional) guest memory status reports.
>
> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
[...]
> static void hv_balloon_handle_unballoon_response(HvBalloon *balloon,
> diff --git a/monitor/monitor.c b/monitor/monitor.c
> index dc352f9e9d95..81513c642691 100644
> --- a/monitor/monitor.c
> +++ b/monitor/monitor.c
> @@ -315,6 +315,7 @@ static MonitorQAPIEventConf monitor_qapi_event_conf[QAPI_EVENT__MAX] = {
> [QAPI_EVENT_QUORUM_FAILURE] = { 1000 * SCALE_MS },
> [QAPI_EVENT_VSERPORT_CHANGE] = { 1000 * SCALE_MS },
> [QAPI_EVENT_MEMORY_DEVICE_SIZE_CHANGE] = { 1000 * SCALE_MS },
> + [QAPI_EVENT_HV_BALLOON_STATUS_REPORT] = { 1000 * SCALE_MS },
> };
>
> /*
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 5ede977cf2bc..f592876964af 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1113,6 +1113,70 @@
> { 'event': 'BALLOON_CHANGE',
> '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, DeviceNotFound
> +# - If guest memory status reporting not enabled or no guest memory status
> +# report received yet, GenericError
Indentation is off, confusing Sphinx.
Do you actually need to tell the two failures apart?
Do me a favour and break the lines a bit earlier, like
# 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, DeviceNotFound
# - If guest memory status reporting 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.
> +#
> +# @data - a @HvBalloonInfo equivalent to the one returned by the
This needs to be
# @data: ... text ...
to be rendered correctly.
Suggest
# @data: contents of "STATUS" message received from the guest.
> +# 'query-hv-balloon-status-report' command.
> +#
> +# 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:
> #
next prev parent reply other threads:[~2023-09-25 11:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 16:48 [PATCH v7 0/7] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️) Maciej S. Szmigiero
2023-08-28 16:48 ` [PATCH v7 1/7] memory-device: Support empty memory devices Maciej S. Szmigiero
2023-08-28 16:48 ` [PATCH v7 2/7] memory-device: Drop size alignment check Maciej S. Szmigiero
2023-08-28 16:48 ` [PATCH v7 3/7] Add Hyper-V Dynamic Memory Protocol definitions Maciej S. Szmigiero
2023-09-27 10:54 ` David Hildenbrand
2023-08-28 16:48 ` [PATCH v7 4/7] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon) Maciej S. Szmigiero
2023-08-28 16:48 ` [PATCH v7 5/7] qapi: Add query-memory-devices support to hv-balloon Maciej S. Szmigiero
2023-09-25 11:16 ` Markus Armbruster
2023-09-27 10:52 ` David Hildenbrand
2023-08-28 16:48 ` [PATCH v7 6/7] qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command Maciej S. Szmigiero
2023-09-25 11:49 ` Markus Armbruster [this message]
2023-09-25 17:12 ` Maciej S. Szmigiero
2023-09-26 6:38 ` Markus Armbruster
2023-08-28 16:48 ` [PATCH v7 7/7] hw/i386/pc: Support hv-balloon Maciej S. Szmigiero
2023-09-27 10:49 ` David Hildenbrand
2023-10-18 8:00 ` [PATCH v7 0/7] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈) David Hildenbrand
2023-10-18 8:45 ` Maciej S. Szmigiero
2023-10-18 9:28 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzse79rj.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=mail@maciej.szmigiero.name \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.