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: Fri, 1 Jan 2010 12:37:51 +0200

On Thu, Dec 31, 2009 at 01:01:50PM -0600, Anthony Liguori wrote:
> On 12/31/2009 09:39 AM, Gleb Natapov wrote:
> >>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.
> 
> A common device printing mechanism is probably no more code than
> your current patch.
> 
Have you looked at my patch at all? What part of it can be made generic
in your opinion? All it does is transforms ioapic state to human
readable way (and that requires device internals kwoulage) and pot it
into QObject form.
 
> My position is that if that generic mechanism is not good enough for
> you, then we should look at fixing that problem instead of
> introducing a completely redundant mechanism.
> 
Generic mechanism is by definition cannot decode device state with
knowledge of device specific details.

> Heck, even if you had a generic mechanism and then a big if in the
> middle of it that treated ioapic better than other devices, it would
> be 100x better than introducing a 1-off command.
> 
The 'if' you are talking about (which is crazy by the way 'if' for each
device in a common code?) will call the function my patch adds.

--
                        Gleb.




reply via email to

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