From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Juan Quintela <quintela@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization
Date: Sat, 22 May 2010 21:55:17 +0300 [thread overview]
Message-ID: <4BF82895.6000706@redhat.com> (raw)
In-Reply-To: <1f557b9feb1965a61e64f7166bcf4918bed8d0ec.1274516288.git.jan.kiszka@web.de>
On 05/22/2010 11:18 AM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> This introduces device_show, a monitor command that saves the vmstate of
> a qdev device and visualizes it. QMP is also supported. Buffers are cut
> after 16 byte by default, but the full content can be requested via
> '-f'. To pretty-print sub-arrays, vmstate is extended to store the start
> index name. A new qerror is introduced to signal a missing vmstate. And
> it comes with documentation.
>
> +
> +Dump a snapshot of the device state. Buffers are cut after 16 bytes unless
> +a full dump is requested.
> +
> +Arguments:
> +
> +- "path": the device's qtree path or unique ID (json-string)
>
This may be ambiguous.
> +- "full": report full state (json-bool, optional)
>
Is this needed for QMP? The client can always truncate it to any length.
> +
> +Schema of returned object:
> +
> +{ "device": json-string, "id": json-string, "fields" : [ field-objects ] }
> +
> +The field object array may be empty, otherwise it consists of
> +
> +{ "name": json-string, "size": json-int, "elems": [ element-objects ] }
> +
> +"size" describes the real number of bytes required for a binary representation
> +of a single field element in the array. The actually transfered amount may be
> +smaller unless a full dump was requested.
>
This converts the entire qdev tree into an undocumented stable protocol
(the qdev paths were already in this state I believe). This really
worries me.
> +
> +The element object array may be empty, otherwise it can contain
> +
> +- json-int objects
> +- QMP buffer objects
> +- field objects
> +- arrays of json-ints, QMP buffers, or field objects
> +
> +Example:
> +
> +-> { "execute": "device_show", "arguments": { "path": "isa.0/i8042" } }
> +<- { "return": { "device": "i8042", "id": "", "fields":
> + [ { "name": "kbd", "size": 4, "elems":
> + [ { "name": "write_cmd", "size": 1, "elems": [0] },
> + { "name": "status", "size": 1, "elems": [25] },
> + { "name": "mode", "size": 1, "elems": [3] },
> + { "name": "pending", "size": 1, "elems": [1] }
> + ] }
> + ]
> + }
> + }
> +
> +EQMP
>
Looks good. I am only worried about long term stability and documentation.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2010-05-22 18:55 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 8:17 [Qemu-devel] [PATCH v2 00/15] Basic device state visualization Jan Kiszka
2010-05-22 8:17 ` [Qemu-devel] [PATCH v2 01/15] Add dependency of JSON unit tests on config-host.h Jan Kiszka
2010-05-22 8:17 ` [Qemu-devel] [PATCH v2 02/15] qdev: Fix scanning across single-bus devices Jan Kiszka
2010-05-29 7:38 ` Markus Armbruster
2010-05-29 7:56 ` Jan Kiszka
2010-05-31 9:45 ` Gerd Hoffmann
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 03/15] qdev: Allow device addressing via 'driver.instance' Jan Kiszka
2010-05-29 7:50 ` Markus Armbruster
2010-05-29 8:09 ` Jan Kiszka
2010-05-31 8:43 ` Markus Armbruster
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 04/15] qdev: Convert device and bus lists to QTAILQ Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 05/15] qdev: Allow device specification by qtree path for device_del Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 06/15] qdev: Push QMP mode checks into qbus_list_bus/dev Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 07/15] monitor: Add completion for qdev paths Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 08/15] Add base64 encoder/decoder Jan Kiszka
2010-05-22 13:59 ` Blue Swirl
2010-05-23 7:55 ` Jan Kiszka
2010-05-23 8:48 ` Avi Kivity
2010-05-23 10:04 ` Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 09/15] QMP: Reserve namespace for complex object classes Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 10/15] Add QBuffer Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 11/15] monitor: return length of printed string via monitor_[v]printf Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 12/15] monitor: Add basic device state visualization Jan Kiszka
2010-05-22 18:55 ` Avi Kivity [this message]
2010-05-23 7:57 ` [Qemu-devel] " Jan Kiszka
2010-05-23 8:44 ` Avi Kivity
2010-05-23 10:03 ` Jan Kiszka
2010-05-23 10:42 ` Avi Kivity
2010-05-29 8:00 ` Markus Armbruster
2010-05-29 8:14 ` Jan Kiszka
2010-05-30 8:26 ` Avi Kivity
2010-05-30 12:36 ` Jan Kiszka
2010-05-31 8:46 ` Markus Armbruster
2010-05-31 8:58 ` Jan Kiszka
2010-05-31 11:07 ` Markus Armbruster
2010-05-31 11:11 ` Jan Kiszka
2010-05-24 12:51 ` Luiz Capitulino
2010-05-24 20:22 ` Anthony Liguori
2010-05-24 20:22 ` Anthony Liguori
2010-05-24 20:35 ` Jan Kiszka
2010-05-24 21:49 ` Anthony Liguori
2010-05-24 22:12 ` Jan Kiszka
2010-05-24 22:27 ` Anthony Liguori
2010-05-25 7:23 ` Avi Kivity
2010-05-25 13:03 ` Anthony Liguori
2010-05-25 13:19 ` Avi Kivity
2010-05-25 13:31 ` Anthony Liguori
2010-05-25 13:41 ` Avi Kivity
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 13/15] QMP: Teach basic capability negotiation to python example Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 14/15] QMP: Fix python helper /wrt long return strings Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 15/15] QMP: Add support for buffer class to qmp python helper Jan Kiszka
2010-05-22 14:05 ` [Qemu-devel] [PATCH v2 00/15] Basic device state visualization Blue Swirl
2010-05-23 7:55 ` Jan Kiszka
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=4BF82895.6000706@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jan.kiszka@web.de \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).