qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] add "info ioapic" monitor command


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH] add "info ioapic" monitor command
Date: Thu, 31 Dec 2009 17:39:50 +0200

On Thu, Dec 31, 2009 at 08:18:40AM -0600, Anthony Liguori wrote:
> On 12/31/2009 12:38 AM, Avi Kivity wrote:
> >On 12/31/2009 12:46 AM, Anthony Liguori wrote:
> >>>I wasn't worried about that, only the increased code duplication.
> >>
> >>
> >>I wasn't thinking there would be an info ioapic command but rather a
> >>generic device-info command that would work with any qdev device. No
> >>code duplication (in fact, much, much less in the long term).
> >
> >Machine printing isn't going to work. The information needs to be
> >formatted to be legible and bit fields decoded. Some field's
> >interpretation may depend on the value of others.
> 
> The cases where you want to have complex display of a device's state
> is the exception and it should be treated as such.
> 
This is the other way around. We always want to have complex display of
a device's state, but because we have many devices and not many
resources it is impossible to achieve.

> The common case is where you just want to see the state of the
> device. We support hundreds of devices.  We can have one code path
> that displays 95% of them with a couple devices that have exceptions
> or we could have hundreds of these commands that aren't consistent
> because they're all open-coded.
I am not against having common code path that prints out state of all
devices. It just different from what I am trying to achieve with my patch.
My patch adds parsing and pretty-printing of device state and that's the
part that is not addressed with your common code scenario.

> 
>  In some case machine
> >printing of vmstate will show you the history of that devices live
> >migration bug fixes in addition to its state.
> 
> I don't see this as a bad thing.
> 
> Regards,
> 
> Anthony Liguori

--
                        Gleb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]