From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLk3v-0000zk-Uo for qemu-devel@nongnu.org; Tue, 30 Jun 2009 16:36:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLk3r-0000vc-IK for qemu-devel@nongnu.org; Tue, 30 Jun 2009 16:36:19 -0400 Received: from [199.232.76.173] (port=39207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLk3r-0000vP-B1 for qemu-devel@nongnu.org; Tue, 30 Jun 2009 16:36:15 -0400 Received: from rv-out-0708.google.com ([209.85.198.245]:18209) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLk3r-0000zQ-2y for qemu-devel@nongnu.org; Tue, 30 Jun 2009 16:36:15 -0400 Received: by rv-out-0708.google.com with SMTP id b17so124066rvf.22 for ; Tue, 30 Jun 2009 13:36:13 -0700 (PDT) Message-ID: <4A4A7739.3030806@codemonkey.ws> Date: Tue, 30 Jun 2009 15:36:09 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/8] qdev/core: bus list References: <1246353962-32308-1-git-send-email-kraxel@redhat.com> <200906301218.35086.paul@codesourcery.com> <87k52t8xvk.fsf@pike.pond.sub.org> <200906301821.18245.paul@codesourcery.com> <87ab3p7cbh.fsf@pike.pond.sub.org> <4A4A6C48.3060101@codemonkey.ws> <4A4A731D.5020306@redhat.com> In-Reply-To: <4A4A731D.5020306@redhat.com> 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: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Markus Armbruster , Paul Brook Gerd Hoffmann wrote: > On 06/30/09 21:49, Anthony Liguori wrote: >> I think it's a perfectly valid suggestion that we should identify buses >> based on the their location in the tree to users verses a number >> generated based on some hashing algorithm. > > >> A tree location has meaning to a user. A random integer doesn't. > > Well. Depends on the bus I think. About PCI devices the usual user > probably thinks in terms of "$bus:$slot.$function", which includes a > bus number. But if you think of SCSI as a bus, then it makes more sense to enumerate each SCSI bus by the tree location (which would end up being the PCI location) than a made up number. > Speaking of PCI: the PCI bus number (aka PCIBus->bus_num) has nothing > to do with the more or less random bus number introduced by the (now > dropped) patch (aka PCIBus->qdev.busnr). Yup. > Which indicates that it is probably less confusing to have the bus > implementation handle the enumeration of busses. If it makes sense > for the bus in question of course. sysbus probably doesn't care ;) That's probably a good point. Regards, Anthony Liguori