From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40065 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJ1Yh-000099-RO for qemu-devel@nongnu.org; Mon, 31 May 2010 05:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJ1Yg-0008Ho-Kw for qemu-devel@nongnu.org; Mon, 31 May 2010 05:45:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11917) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJ1Yg-0008Hk-CL for qemu-devel@nongnu.org; Mon, 31 May 2010 05:45:22 -0400 Message-ID: <4C038529.3090107@redhat.com> Date: Mon, 31 May 2010 11:45:13 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 02/15] qdev: Fix scanning across single-bus devices References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Jan Kiszka , Avi Kivity On 05/29/10 09:38, Markus Armbruster wrote: > [cc: kraxel] > > Jan Kiszka writes: > >> From: Jan Kiszka >> >> As long as we allow /dev.1 as shortcut for /dev1/bus1, we also have to >> make sure that /dev1/dev2 works for /dev1/bus1/dev2/bus2 - as long as >> there is only one child bus per device. > > We auto-root a path not starting with '/' via convention "first > component is ID then" (I like that). We auto-complete a path ending > with a device when we want a bus (a bit too clever). ... only if there is a single child bus only (i.e. it isn't ambiguous). Which is the common case though. > Auto-inserting bus > names in the middle is too clever by half! Yea. I have to agree here. It can only work reliably if you make sure all your devices have unique ids. In which case there is no need to reference dev1 at all, you can just use the "first component is ID then" mechanism for dev2. cheers, Gerd