Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-31 Thread Jan Kiszka
Markus Armbruster wrote: > Jan Kiszka writes: > >> Markus Armbruster wrote: >>> Jan Kiszka writes: >>> Avi Kivity wrote: > On 05/29/2010 11:14 AM, Jan Kiszka wrote: >>> Currently breaks down when IDs contain '/', but permitting that is a >>> bug. There may be more problems; the

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-31 Thread Markus Armbruster
Jan Kiszka writes: > Markus Armbruster wrote: >> Jan Kiszka writes: >> >>> Avi Kivity wrote: On 05/29/2010 11:14 AM, Jan Kiszka wrote: >> Currently breaks down when IDs contain '/', but permitting that is a >> bug. There may be more problems; the path lookup code is way too >>

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-31 Thread Jan Kiszka
Markus Armbruster wrote: > Jan Kiszka writes: > >> Avi Kivity wrote: >>> On 05/29/2010 11:14 AM, Jan Kiszka wrote: > Currently breaks down when IDs contain '/', but permitting that is a > bug. There may be more problems; the path lookup code is way too > clever. > Inde

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-31 Thread Markus Armbruster
Jan Kiszka writes: > Avi Kivity wrote: >> On 05/29/2010 11:14 AM, Jan Kiszka wrote: Currently breaks down when IDs contain '/', but permitting that is a bug. There may be more problems; the path lookup code is way too clever. >>> Indeed. Less can sometimes be more. My i

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-30 Thread Jan Kiszka
Avi Kivity wrote: > On 05/29/2010 11:14 AM, Jan Kiszka wrote: >>> Currently breaks down when IDs contain '/', but permitting that is a >>> bug. There may be more problems; the path lookup code is way too >>> clever. >>> >> Indeed. Less can sometimes be more. My impression is that some of the

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-30 Thread Avi Kivity
On 05/29/2010 11:14 AM, Jan Kiszka wrote: Currently breaks down when IDs contain '/', but permitting that is a bug. There may be more problems; the path lookup code is way too clever. Indeed. Less can sometimes be more. My impression is that some of the cleverness was motivated by lacking

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-29 Thread Jan Kiszka
Markus Armbruster wrote: > Avi Kivity writes: > >> On 05/23/2010 10:57 AM, Jan Kiszka wrote: >>> Avi Kivity wrote: >>> On 05/22/2010 11:18 AM, Jan Kiszka wrote: > From: Jan Kiszka > > This introduces device_show, a monitor command that saves the vmstate of > a

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-29 Thread Markus Armbruster
Avi Kivity writes: > On 05/23/2010 10:57 AM, Jan Kiszka wrote: >> Avi Kivity wrote: >> >>> On 05/22/2010 11:18 AM, Jan Kiszka wrote: >>> From: Jan Kiszka This introduces device_show, a monitor command that saves the vmstate of a qdev device and visualizes it. QMP is

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:31 PM, Anthony Liguori wrote: On 05/25/2010 08:19 AM, Avi Kivity wrote: On 05/25/2010 04:03 PM, Anthony Liguori wrote: I don't think that qdev device names and paths are something we have to worry much about changing over time since they reflect logical bus layout. They sho

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:19 AM, Avi Kivity wrote: On 05/25/2010 04:03 PM, Anthony Liguori wrote: I don't think that qdev device names and paths are something we have to worry much about changing over time since they reflect logical bus layout. They should remain static provided the devices remain s

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:03 PM, Anthony Liguori wrote: I don't think that qdev device names and paths are something we have to worry much about changing over time since they reflect logical bus layout. They should remain static provided the devices remain static. Modulo mistakes. We already saw o

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-25 Thread Anthony Liguori
On 05/25/2010 02:23 AM, Avi Kivity wrote: On 05/24/2010 11:22 PM, Anthony Liguori wrote: 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. N.B. the association with qdev is only in identifyi

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-25 Thread Avi Kivity
On 05/24/2010 11:22 PM, Anthony Liguori wrote: 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. N.B. the association with qdev is only in identifying the device. The contents of the device

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Anthony Liguori
On 05/24/2010 05:12 PM, Jan Kiszka wrote: Anthony Liguori wrote: On 05/24/2010 03:35 PM, Jan Kiszka wrote: In contrast to save/loadvm, device_show does not provide a backward-compatible output. Not only field names can change (as a result of internal refactoring), Field names

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Jan Kiszka
Anthony Liguori wrote: > On 05/24/2010 03:35 PM, Jan Kiszka wrote: >> In contrast to save/loadvm, device_show does not provide a >> backward-compatible output. Not only field names can change (as a result >> of internal refactoring), > > Field names could change, but that seems unlikely and unnece

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Anthony Liguori
On 05/24/2010 03:35 PM, Jan Kiszka wrote: In contrast to save/loadvm, device_show does not provide a backward-compatible output. Not only field names can change (as a result of internal refactoring), Field names could change, but that seems unlikely and unnecessary. fields may even disappea

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Jan Kiszka
Anthony Liguori wrote: > On 05/22/2010 01:55 PM, Avi Kivity wrote: >> On 05/22/2010 11:18 AM, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> 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

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Anthony Liguori
On 05/22/2010 01:55 PM, Avi Kivity wrote: On 05/22/2010 11:18 AM, Jan Kiszka wrote: From: Jan Kiszka 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 ca

Re: [Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Anthony Liguori
On 05/24/2010 07:51 AM, Luiz Capitulino wrote: On Sun, 23 May 2010 09:57:43 +0200 Jan Kiszka wrote: Avi Kivity wrote: [...] +- "full": report full state (json-bool, optional) Is this needed for QMP? The client can always truncate it to any length.

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-24 Thread Luiz Capitulino
On Sun, 23 May 2010 09:57:43 +0200 Jan Kiszka wrote: > Avi Kivity wrote: [...] > > > >> +- "full": report full state (json-bool, optional) > >> > > > > Is this needed for QMP? The client can always truncate it to any length. > > The effect may not be needed for QMP, but I do need this c

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-23 Thread Avi Kivity
On 05/23/2010 01:03 PM, Jan Kiszka wrote: Can your elaborate what precisely is ambiguous? Can't the user choose the unique ID so that it aliases an unrelated qtree path? True. I'll swap the search order and document this. Qtree paths should always rule. Well, I guess the u

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-23 Thread Jan Kiszka
Avi Kivity wrote: > On 05/23/2010 10:57 AM, Jan Kiszka wrote: >> Avi Kivity wrote: >> >>> On 05/22/2010 11:18 AM, Jan Kiszka wrote: >>> From: Jan Kiszka This introduces device_show, a monitor command that saves the vmstate of a qdev device and visualizes it. QMP is

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-23 Thread Avi Kivity
On 05/23/2010 10:57 AM, Jan Kiszka wrote: Avi Kivity wrote: On 05/22/2010 11:18 AM, Jan Kiszka wrote: From: Jan Kiszka 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 def

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-23 Thread Jan Kiszka
Avi Kivity wrote: > On 05/22/2010 11:18 AM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> 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 reques

[Qemu-devel] Re: [PATCH v2 12/15] monitor: Add basic device state visualization

2010-05-22 Thread Avi Kivity
On 05/22/2010 11:18 AM, Jan Kiszka wrote: From: Jan Kiszka 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 su