[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 0/8] Basic device state visualization
From: |
Avi Kivity |
Subject: |
[Qemu-devel] Re: [PATCH 0/8] Basic device state visualization |
Date: |
Fri, 14 May 2010 19:12:38 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
On 05/14/2010 04:20 PM, 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.
Wonderful! may even motivate some more qmp conversions.
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...
Will be interesting to pass these annotations via qmp as well.
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!
I'd like to see qmp command documentation for this.
--
Do not meddle in the internals of kernels, for they are subtle and quick to
panic.
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, (continued)
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Avi Kivity, 2010/05/17
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Avi Kivity, 2010/05/17
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Jan Kiszka, 2010/05/17
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Avi Kivity, 2010/05/17
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Jan Kiszka, 2010/05/17
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Avi Kivity, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Markus Armbruster, 2010/05/18
- Re: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Avi Kivity, 2010/05/18
- [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Anthony Liguori, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer, Markus Armbruster, 2010/05/18
[Qemu-devel] Re: [PATCH 0/8] Basic device state visualization,
Avi Kivity <=
Re: [Qemu-devel] [PATCH 0/8] Basic device state visualization, Anthony Liguori, 2010/05/14
Re: [Qemu-devel] [PATCH 0/8] Basic device state visualization, Blue Swirl, 2010/05/14