qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 1/8] qdev: Allow device addressing via 'driver.i


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 1/8] qdev: Allow device addressing via 'driver.instance'
Date: Tue, 18 May 2010 18:54:37 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Gerd Hoffmann wrote:
> On 05/18/10 14:15, Markus Armbruster wrote:
>> Jan Kiszka<address@hidden>  writes:
>>
>>> Extend qbus_find_dev to allow addressing of devices without an unique id
>>> via an optional instance number. The new formats are 'driver.instance'
>>> and 'alias.instance'.
>>>
>>> Signed-off-by: Jan Kiszka<address@hidden>
>>
>> How's the instance number defined?  Should be documented.

OK, will do. For now it is the per-bus instance ID. I think that makes
most sense and is easily handleable. Still, we should probably print it
also via "info qtree" (and a future "query-qtree").

> 
> savevm instance id, used to identify multiple instances of some device
> on loadvm.  By default is just incrementing (0,1,2,...) for each new
> device instance I think.  Drivers can also specify one.  Most don't do
> that.  IIRC some ISA drivers use the base ioport as instance id, which
> sort-of makes sense as it makes sure the id identifies the correct
> device no matter what the initialization order is.

That io-address-based instance numbers have just been deprecated, see
4d2ffa08b601bdd40d9ccf225480c0a7e90ca078. ISA devices are already
converted, there are just a few non-PC devices remaining that don't use
the (auto-generated) vmstate instance number. But that is actually a
different, user-invisible numbering scheme.

> 
> It probably makes sense to replace the instance id with the device path
> once all devices are converted over to qdev+vmstate, so we avoid the
> nasty ordering issues altogether.

You are always free to address devices via a unique user-defined ID.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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