qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/8] Basic device state visualization
Date: Fri, 14 May 2010 13:16:52 -0500	[thread overview]
Message-ID: <4BED9394.9040907@codemonkey.ws> (raw)
In-Reply-To: <cover.1273843151.git.jan.kiszka@siemens.com>

On 05/14/2010 08:20 AM, Jan Kiszka wrote:
> While recently fixing the SCSI reset issues, I once again had the need
> for displaying the state of involved devices. So far the common approach
> is to attach gdb to qemu (or even inject some printf). But that time I
> hacked up a 30-minute patch to dump the vmstate of any (fully converted)
> qdev device.
>
> This series now lays the ground for more sophisticated visulization. It
> adds the monitor command 'device_show<qdev-path>', freezes the vmstate
> of the addressed device, sticks it into a QMP dict, and either transmit
> this via QMP or pretty-prints it on a monitor console. Some example:
>
> (qemu) device_show /i440FX-pcihost/pci.0/piix3-usb-uhci
> dev: piix3-usb-uhci, id ""
>    dev.
>      version_id:         00000002
>      config:             a0 7d d1 00 00 00 00 00 - b0 7e d1 00 00 00 00 00
>                          ...
>      irq_state:          00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
>    num_ports_vmstate:    02
>    ports[00].
>        ctrl:             0083
>    ports[01].
>        ctrl:             0080
>    cmd:                  00c1
>    status:               0000
>    intr:                 0000
>    frnum:                0077
>    fl_base_addr:         0fffc000
>    sof_timing:           40
>    status2:              00
>    frame_timer:          0000000000cb2bd0
>
> Basically, this is the level of support I recently saw in a
> demonstration of some commercial simulator as well. We are just lacking
> support for the yet unconverted devices. And I think we can even do
> better on the long term, e.g. by annotating state variables that contain
> flags, or by pretty-printing buffers like the PCI config space, or...
>
> Let's give this a start, I bet it will be helpful while adding complex
> device models like AHCI or EHCI. Looking forward to feedback!
>    

Very neat!

Regards,

Anthony Liguori

> Jan Kiszka (8):
>    qdev: Allow device addressing via 'driver.instance'
>    Add base64 encoder/decoder
>    Add QBuffer
>    monitor: Add basic device state visualization
>    qmp: Teach basic capability negotiation to python example
>    qmp: Fix python helper /wrt long return strings
>    Add QLIST_INSERT_TAIL
>    qdev: Add new devices/buses at the tail
>
>   Makefile        |    3 +-
>   Makefile.objs   |    4 +-
>   QMP/qmp-shell   |    1 +
>   QMP/qmp.py      |    2 +-
>   QMP/vm-info     |    1 +
>   base64.c        |  202 +++++++++++++++++++++++++++++++++++
>   base64.h        |   18 +++
>   check-qbuffer.c |  172 ++++++++++++++++++++++++++++++
>   configure       |    2 +-
>   hw/hw.h         |    2 +
>   hw/qdev.c       |  314 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
>   hw/qdev.h       |    2 +
>   qbuffer.c       |  116 ++++++++++++++++++++
>   qbuffer.h       |   33 ++++++
>   qemu-monitor.hx |   16 +++
>   qemu-queue.h    |    9 ++
>   qjson.c         |   16 +++
>   qobject.h       |    1 +
>   18 files changed, 902 insertions(+), 12 deletions(-)
>   create mode 100644 base64.c
>   create mode 100644 base64.h
>   create mode 100644 check-qbuffer.c
>   create mode 100644 qbuffer.c
>   create mode 100644 qbuffer.h
>
>
>    

  parent reply	other threads:[~2010-05-14 18:16 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14 13:20 [Qemu-devel] [PATCH 0/8] Basic device state visualization Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 1/8] qdev: Allow device addressing via 'driver.instance' Jan Kiszka
2010-05-18 12:15   ` Markus Armbruster
2010-05-18 12:31     ` Gerd Hoffmann
2010-05-18 12:38       ` [Qemu-devel] " Juan Quintela
2010-05-18 13:06         ` Gerd Hoffmann
2010-05-18 16:54       ` Jan Kiszka
2010-05-19  8:29       ` [Qemu-devel] " Avi Kivity
2010-05-14 13:20 ` [Qemu-devel] [PATCH 2/8] Add base64 encoder/decoder Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 3/8] Add QBuffer Jan Kiszka
2010-05-14 18:15   ` Anthony Liguori
2010-05-15  8:45     ` [Qemu-devel] " Jan Kiszka
2010-05-15  8:49       ` Avi Kivity
2010-05-15  8:59         ` Jan Kiszka
2010-05-15 17:31           ` Avi Kivity
2010-05-16  9:37             ` Paolo Bonzini
2010-05-16  9:50               ` Avi Kivity
2010-05-16 10:15                 ` Jan Kiszka
2010-05-16 10:16                 ` Paolo Bonzini
2010-05-16 10:49                   ` Avi Kivity
2010-05-16 10:04             ` Jan Kiszka
2010-05-16 17:38     ` [Qemu-devel] " Jamie Lokier
2010-05-16 18:03       ` [Qemu-devel] " Jan Kiszka
2010-05-17 20:20         ` Jamie Lokier
2010-05-17  0:12       ` [Qemu-devel] " Anthony Liguori
2010-05-17  6:48         ` Avi Kivity
2010-05-17  7:40           ` [Qemu-devel] " Jan Kiszka
2010-05-17  7:45             ` Avi Kivity
2010-05-17  7:57               ` Jan Kiszka
2010-05-17  8:10                 ` Avi Kivity
2010-05-17  8:13                   ` Avi Kivity
2010-05-17  8:55                   ` Jan Kiszka
2010-05-17  8:59                     ` Avi Kivity
2010-05-17  9:17                       ` Jan Kiszka
2010-05-17  9:29                         ` Avi Kivity
2010-05-18 12:27                     ` Markus Armbruster
2010-05-18 17:24                       ` Avi Kivity
2010-05-17 13:05               ` Anthony Liguori
2010-05-18 12:28                 ` Markus Armbruster
2010-05-14 13:20 ` [Qemu-devel] [PATCH 4/8] monitor: Add basic device state visualization Jan Kiszka
2010-05-18 12:12   ` Markus Armbruster
2010-05-18 17:09     ` [Qemu-devel] " Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 5/8] qmp: Teach basic capability negotiation to python example Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 6/8] qmp: Fix python helper /wrt long return strings Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 7/8] Add QLIST_INSERT_TAIL Jan Kiszka
2010-05-16  9:38   ` [Qemu-devel] " Paolo Bonzini
2010-05-16 10:16     ` Jan Kiszka
2010-05-14 13:20 ` [Qemu-devel] [PATCH 8/8] qdev: Add new devices/buses at the tail Jan Kiszka
2010-05-14 16:12 ` [Qemu-devel] Re: [PATCH 0/8] Basic device state visualization Avi Kivity
2010-05-14 16:24   ` Jan Kiszka
2010-05-14 16:38     ` Avi Kivity
2010-05-14 18:16 ` Anthony Liguori [this message]
2010-05-14 18:50 ` [Qemu-devel] " Blue Swirl

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=4BED9394.9040907@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --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).