From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48662 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJv6S-0001IX-9z for qemu-devel@nongnu.org; Wed, 02 Jun 2010 17:03:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJv6N-0001gi-6z for qemu-devel@nongnu.org; Wed, 02 Jun 2010 17:03:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2057) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJv6M-0001gK-UZ for qemu-devel@nongnu.org; Wed, 02 Jun 2010 17:03:51 -0400 Message-ID: <4C06C727.9060405@redhat.com> Date: Wed, 02 Jun 2010 23:03:35 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all architectures References: <1274287377-19424-1-git-send-email-berrange@redhat.com> <201005282039.53749.paul@codesourcery.com> <20100602141242.GA10992@redhat.com> <201006021610.56493.paul@codesourcery.com> In-Reply-To: <201006021610.56493.paul@codesourcery.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: Paul Brook Cc: qemu-devel@nongnu.org Hi, > I disagree. Anything that depends on device creation order is fundamentally > broken. If you want to create globally unique user-friendly tags for devices > or busses then that is a completely different problem, and should be done via > explicit aliases. For anything created via -device the id does the job. The device gets tagged with the supplied id, and any child busses of that device carry the id too, i.e. -device lsi,id=foo creates a lsi scsi hostadapter with id 'foo' and a scsi bus with the name 'foo.0'. A (theoretical) scsi hba with two scsi busses would have 'foo.0' and 'foo.1' child busses. If you don't specify a id you'll get 'scsi.$nr'. Numbers are per device, not global. So if you add two lsi adapters without id you'll get two 'scsi.0' busses, so better don't do that if you want be able to address them via bus= ... For devices created by machine->init() the names are more or less hard-coded in qemu though (and hopefully some day in some machine description file). 'pci.0' is the default name for a pci bus and IMHO a good choice for the primary pci bus. secondary busses created by machine->init() (sparc64 does this I think) should get some other name. cheers, Gerd