[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/5] qdev: device capabilities
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 0/5] qdev: device capabilities |
Date: |
Thu, 10 Sep 2009 18:30:17 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Gerd Hoffmann <address@hidden> 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.