qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: RFC qdev path semantics


From: Paul Brook
Subject: Re: [Qemu-devel] Re: RFC qdev path semantics
Date: Wed, 16 Jun 2010 13:21:45 +0100
User-agent: KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.4; x86_64; ; )

> > 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.

Paul



reply via email to

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