qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Avi Kivity <avi@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] add "info ioapic" monitor command
Date: Fri, 1 Jan 2010 12:37:51 +0200	[thread overview]
Message-ID: <20100101103751.GG9233@redhat.com> (raw)
In-Reply-To: <4B3CF51E.8030404@codemonkey.ws>

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.

      parent reply	other threads:[~2010-01-01 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091224150242.GD5691@redhat.com>
     [not found] ` <4B3AB429.5090303@codemonkey.ws>
     [not found]   ` <20091230092728.GB26899@redhat.com>
     [not found]     ` <4B3B60BE.8000302@codemonkey.ws>
     [not found]       ` <20091230142611.GB26626@redhat.com>
     [not found]         ` <20091230143019.GC26626@redhat.com>
     [not found]           ` <4B3BD891.1030102@codemonkey.ws>
     [not found]             ` <20091231001601.GF26626@redhat.com>
     [not found]               ` <4B3CB201.2070102@codemonkey.ws>
     [not found]                 ` <20091231153305.GB9233@redhat.com>
     [not found]                   ` <4B3CF428.7080806@codemonkey.ws>
2010-01-01 10:23                     ` [Qemu-devel] [PATCH] add "info ioapic" monitor command Gleb Natapov
     [not found]   ` <4B3AF8EE.8050106@redhat.com>
     [not found]     ` <4B3B610A.8060801@codemonkey.ws>
     [not found]       ` <4B3B618D.8080407@redhat.com>
     [not found]         ` <4B3BD838.3030200@codemonkey.ws>
     [not found]           ` <4B3C46DF.6010606@redhat.com>
     [not found]             ` <4B3CB2C0.5050205@codemonkey.ws>
     [not found]               ` <20091231153950.GC9233@redhat.com>
     [not found]                 ` <4B3CF51E.8030404@codemonkey.ws>
2010-01-01 10:37                   ` Gleb Natapov [this message]

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=20100101103751.GG9233@redhat.com \
    --to=gleb@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).