qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [0/2] pseries: Rework PCI code for handling multiple PHBs
Date: Mon, 10 Dec 2012 14:58:59 +0200	[thread overview]
Message-ID: <20121210125859.GA28118@redhat.com> (raw)
In-Reply-To: <20121128025053.GK4745@truffula.fritz.box>

On Wed, Nov 28, 2012 at 01:50:53PM +1100, David Gibson wrote:
> On Tue, Nov 27, 2012 at 02:36:57PM +0200, Michael S. Tsirkin wrote:
> > On Tue, Nov 27, 2012 at 05:07:31PM +1100, David Gibson wrote:
> > > Hi Michael, Alex,
> > > 
> > > This patch represents a compromise I hope will be acceptable after the
> > > long thread discussing handling of multiple PCI host bridges on the
> > > pseries machine.  Patch 1/1 is just a preliminary enforcing uniqueness
> > > of LIOBNs in the IOMMU code.
> > > 
> > > Patch 2/2 is the meat.  It allows either explicit configuration of all
> > > the properties, or the user can just set an abstract index which will
> > > generate sensible and probably-unique values for all the rest.
> > > 
> > > With these patches I was able to do something like:
> > > 	qemu-system-ppc64 -M pseries -m 1024 -nographic \
> > > 	fc17-root.qcow2 -net none -device nec-usb-xhci -device \
> > > 	spapr-pci-host-bridge,index=1 -device e1000,netdev=fred \
> > > 	-netdev user,id=fred
> > > 
> > > I was able to see both the PCI domains in the guest, and use the NIC
> > > on the secondary domain.
> > > 
> > > There are still some gotches with multiple domains though.  The domain
> > > value in PCIHostBus is still always initialized to 0, and there are
> > > other places in the PCI core where handling of multiple domains is
> > > essentially stubbed out.
> > > 
> > > Michael, any thoughts on what to do about that?  I could fix up the
> > > PCI code so that domain is actually set and used.  But I think the
> > > whole notion of domain numbers is kind of bogus on the qemu side:
> > > since PCI domains are completely independent from each other, it's
> > > only platform convention which determines what the domain numbers are.
> > > On platforms that don't have a strong convention, the guest will
> > > number them itself and we have no way of knowing that.  So it seems to
> > > me that the PCI code should instead of domain numbers just use the
> > > device ID, or the bus name or some qemu side symbolic name.  For
> > > platforms that do have a numbering convention those names can be
> > > derived from the domain numbers, but it also works for platforms that
> > > don't.
> > 
> > I agree with this last statement: using bus numbers and domain
> > numbers is not a good idea. We mostly need to support domain 0
> > to mean "default" for backwards compatibility.
> 
> Ok.  Where are domain numbers actually specified by the qemu user?

pci_parse_devaddr

> -- 
> David Gibson			| I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
> 				| _way_ _around_!
> http://www.ozlabs.org/~dgibson

      reply	other threads:[~2012-12-10 12:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  6:07 [Qemu-devel] [0/2] pseries: Rework PCI code for handling multiple PHBs David Gibson
2012-11-27  6:07 ` [Qemu-devel] [PATCH 1/2] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs David Gibson
2012-12-10 13:00   ` Michael S. Tsirkin
2012-12-11  9:59     ` Alexander Graf
2012-11-27  6:07 ` [Qemu-devel] [PATCH 2/2] pseries: Properly handle allocation of multiple PCI host bridges David Gibson
2012-11-28  2:50   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2012-12-10 13:00   ` [Qemu-devel] " Michael S. Tsirkin
2012-11-27 12:36 ` [Qemu-devel] [0/2] pseries: Rework PCI code for handling multiple PHBs Michael S. Tsirkin
2012-11-28  2:50   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2012-12-10 12:58     ` Michael S. Tsirkin [this message]

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=20121210125859.GA28118@redhat.com \
    --to=mst@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).