[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: RFC qdev path semantics
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] Re: RFC qdev path semantics |
Date: |
Wed, 16 Jun 2010 15:50:03 +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 |
Paul Brook wrote:
>>> I think this would be better served by adding explicit aliases/IDs for
>>> those use-cases. i.e. define the global ID "pci.0" to be an alias for
>>>
>>> /i440FX-pcihost/pci
>> Makes sense. We could attach this ID to the BusState (corresponding to
>> DeviceState:id) and manually set it during machine init.
>> qbus_find_recursive would then look for a matching ID instead of a name.
>
> If we accept your proposal that global ids are not accepted as local device
> identifiers, then these probably shouldn't be stored in the device tree at
> all.
>
> Allowing at most one global ID per node also seems like a rather arbitrary
> limitation.
>
> How about having a global alias table that maps an ID to a devtree path?
> The code to handle these becomes a straight string substitution followed by a
> normal path lookup. We don't need separate code for device v.s. bus, and
> "global_device_id/busname" just works.
No principle concerns about such a table. It should nevertheless be
reference-based to assist lifetime management of aliases that are
created together with the devices they point to.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
RFC qdev path semantics (was: [Qemu-devel] [RFC PATCH 0/5] Introduce canonical device hierarchy string), Markus Armbruster, 2010/06/16
[Qemu-devel] Re: RFC qdev path semantics, Markus Armbruster, 2010/06/16
[Qemu-devel] Re: RFC qdev path semantics, Alex Williamson, 2010/06/17
[Qemu-devel] Re: RFC qdev path semantics, Gerd Hoffmann, 2010/06/18
[Qemu-devel] Re: RFC qdev path semantics, Markus Armbruster, 2010/06/18
[Qemu-devel] Re: RFC qdev path semantics, Anthony Liguori, 2010/06/22