All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/5] qdev: device capabilities
Date: Thu, 10 Sep 2009 18:30:17 +0200	[thread overview]
Message-ID: <87eiqeiwyu.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <4AA5FF3D.7010404@redhat.com> (Gerd Hoffmann's message of "Tue\, 08 Sep 2009 08\:52\:45 +0200")

Gerd Hoffmann <kraxel@redhat.com> writes:

> On 09/07/09 22:36, Anthony Liguori wrote:
>> Gerd Hoffmann wrote:
>>> Patch #5 does just that. Almost. -watchdog continues to accept
>>> watchdog devices only. And '-watchdog ?' lists watchdog devices only.
>>>
>>> watchdog_list is gone, the qdev list is used instead. To identify the
>>> watchdog devices in the qdev device model list the capability bit is
>>> used. The patch description says so, doesn't it?
>>
>> Instead of checking the capability bit, why not look for a property with
>> a type that's unique to the watch dog timer.
>
> *There is no such property.*
>
> We are running in circles for months now.  You are suggesting to look
> for a unique property.  I point out that it simply doesn't work for
> certain devices due to lack of such a property.  Repeat.
>
> Can we stop that please?
>
> Do you suggest to create some unused dummy property to tag devices?

We could make it a set of well-known bits, say bit#0 audio, bit#1
ethernet, bit#2 display, bit#3 watchdog, ..., and call it "caps" ;)

I think we all agree that we want watchdog_list replaced by filtering
watchdog devices from the qdev list.  I figure there will be more
applications for that elsewhere (-net nic,model=?  comes to mind).

Filtering the qdev list requires a way to ask "what kind of device is
this?", or at least "is this a FOO device?", for the various FOOs.

Capabilities support that in a simple, general way.

We can answer either question by detecting characteristic properties
instead.  But it'll require artificial characteristic properties, as the
watchdog example demonstrates.  And I doubt it'll be easier or cleaner
in the end.

      reply	other threads:[~2009-09-10 16:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 10:27 [Qemu-devel] [PATCH 0/5] qdev: device capabilities Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 1/5] " Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 2/5] qdev: add audio capability Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 3/5] qdev: add ethernet capability Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 4/5] qdev: add display capability Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 5/5] qdev: add watchdog capability Gerd Hoffmann
2009-09-04 15:08 ` [Qemu-devel] [PATCH 0/5] qdev: device capabilities Anthony Liguori
2009-09-04 15:16   ` Gerd Hoffmann
2009-09-05 13:39     ` Anthony Liguori
2009-09-07 10:47       ` Gerd Hoffmann
2009-09-07 20:36         ` Anthony Liguori
2009-09-08  6:52           ` Gerd Hoffmann
2009-09-10 16:30             ` Markus Armbruster [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=87eiqeiwyu.fsf@pike.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=kraxel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.