qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all architectures
Date: Wed, 02 Jun 2010 23:03:35 +0200	[thread overview]
Message-ID: <4C06C727.9060405@redhat.com> (raw)
In-Reply-To: <201006021610.56493.paul@codesourcery.com>

   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

  reply	other threads:[~2010-06-02 21:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 16:42 [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all architectures Daniel P. Berrange
2010-05-19 19:19 ` Blue Swirl
2010-05-20 10:00   ` Daniel P. Berrange
2010-05-28 19:39 ` Paul Brook
2010-05-29  5:13   ` Markus Armbruster
2010-06-02 15:13     ` Paul Brook
2010-06-11 13:00       ` Markus Armbruster
2010-06-11 14:28         ` Paul Brook
2010-06-02 14:12   ` Daniel P. Berrange
2010-06-02 15:10     ` Paul Brook
2010-06-02 21:03       ` Gerd Hoffmann [this message]
2010-06-03  5:45         ` Paul Brook
2010-06-03 10:14     ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C06C727.9060405@redhat.com \
    --to=kraxel@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).