From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3xfq-0007u9-6w for qemu-devel@nongnu.org; Wed, 14 Sep 2011 18:11:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3xfo-000144-RN for qemu-devel@nongnu.org; Wed, 14 Sep 2011 18:11:18 -0400 Received: from mail-gx0-f181.google.com ([209.85.161.181]:65408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3xfo-00013y-Os for qemu-devel@nongnu.org; Wed, 14 Sep 2011 18:11:16 -0400 Received: by gxk9 with SMTP id 9so2649978gxk.12 for ; Wed, 14 Sep 2011 15:11:16 -0700 (PDT) Message-ID: <4E71267A.3020808@codemonkey.ws> Date: Wed, 14 Sep 2011 17:11:06 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E70EC90.8000904@us.ibm.com> <4E7100E9.70305@web.de> <4E7103AE.5060201@codemonkey.ws> <4E711969.8030400@web.de> In-Reply-To: <4E711969.8030400@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Plan for moving forward with QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Peter Maydell , "Edgar E. Iglesias" , qemu-devel , Markus Armbruster , Gerd Hoffmann On 09/14/2011 04:15 PM, Jan Kiszka wrote: > On 2011-09-14 21:42, Anthony Liguori wrote: >>> Such names can get fairly long I'm afraid... >> >> A user should never even see these names. A user probably will always >> interact with devices via paths. > > Right. > > But will those automatic names be used at all then? Yes, because QEMU is not going to know anything about path names :-) Path names should be a concept that exists entirely in the client. That may be HMP or that may be a command line tool (like the proposed qemu script). The only management interface exposed to the client is: create_object(type, name) value = get_object_property(name, property_name) void set_object_property(name, property_name, value) props = list_object_properties(name) names = list_objects() So names are very important from a QMP perspective, but not something users every really see. > >> >> We can also look at doing things like user-defined aliases or something >> like that. > > ...or a way to set the name of an auto-generated device via its pathname. The auto-generated name is already basically generated from a pathname. But that path isn't necessarily the obvious one from a user's point of view. >>>> Since a bus is-a device in QOM, there is no notion of having multiple >>>> busses >>>> under the same device. A device can implement multiple bus interfaces, >>>> but can >>>> only be a single bus of any given bus interface. >>>> >>>> Device names are completely independent of pathnames. For devices that >>>> are no >>>> user created, device names should be treated as opaque blobs with >>>> absolutely no >>>> semantic meaning. >>>> >>>> All device relationships are identified as named properties. A QOM path >>>> name >>>> consists of a named device, >>> >>> With a system root device called '/'. So '/' is another >>> character(-sequence) that is forbidden in device names. >> >> Yes, but there is no system root device. > > There is always a generic link to some root device. I think it would be > more regular to make that link an abstract device called '/' - maybe > even one that can hold a larger number of children. Keeps the door open > for crazy multi-root systems models. From a client perspective, yes. The scripts I showed at KVM Forum had '/' return the list of all user-created devices as the contents. It's a nice feature but I think it's something that lives in a client, not in the object model. Regards, Anthony Liguori > > Jan >