From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUM7o-0008Ul-94 for qemu-devel@nongnu.org; Wed, 08 Jun 2011 13:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUM7j-0002PR-Ew for qemu-devel@nongnu.org; Wed, 08 Jun 2011 13:00:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUM7i-0002P4-RS for qemu-devel@nongnu.org; Wed, 08 Jun 2011 13:00:55 -0400 Message-ID: <4DEFAAB8.4090000@redhat.com> Date: Wed, 08 Jun 2011 19:00:40 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Markus Armbruster Hi, > Since qbus_create_inplace() adds each new child bus to > the front of the parent's child_bus list, this means that > qbus_find_recursive() will encounter the last-added bus > first, whereas usb_bus_find() will get the first-added bus. Quite a while back I've tried to switch qdev from QLIST to QTAILQ exactly to allow adding stuff to the tail of the lists(s), because that feels more natural to me than the current ordering. "info qtree" is upside-down too ;) Gave up after resending it one or two times, the forgot about it, wasn't *that* important to me. > Is there anything we can do to fix this inconsistency [*], > or are we tied to the existing enumeration orders in both > cases for compatibility with users with currently-working > command lines or configurations? Could be we break something. I think it is unlikely though. Multiple busses of the same type are pretty uncommon, and any examples with multiple lsi adapters (for example) advertise explicitly assign devices via bus=. libvirt uses bus= everywhere too. cheers, Gerd