All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Alexander Bezzubikov <zuban32s@gmail.com>
Cc: marcel@redhat.com, qemu-devel@nongnu.org, seabios@seabios.org
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init
Date: Wed, 19 Jul 2017 14:18:53 -0400	[thread overview]
Message-ID: <20170719181853.GC13096@char.us.oracle.com> (raw)
In-Reply-To: <CAKSfGUDgtN+S=u_4S7-s1wUxt6fZtibLG+ZSX+qZ0d+9marXQQ@mail.gmail.com>

On Wed, Jul 19, 2017 at 05:14:41PM +0000, Alexander Bezzubikov wrote:
> ср, 19 июля 2017 г. в 16:57, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:
> 
> > On Wed, Jul 19, 2017 at 04:20:12PM +0300, Aleksandr Bezzubikov wrote:
> > > Now PCI bridges (and PCIE root port too) get a bus range number in
> > system init,
> > > basing on currently plugged devices. That's why when one wants to
> > hotplug another bridge,
> > > it needs his child bus, which the parent is unable to provide.
> >
> > Could you explain how you trigger this?
> 
> 
> I'm trying to hot plug pcie-pci bridge into pcie root port, and Linux says
> 'cannot allocate bus number for device bla-bla'. This obviously does not
> allow me to use the bridge at all.
> 
> >
> >
> > > The suggested workaround is to have vendor-specific capability in RedHat
> > generic pcie-root-port
> > > that contains number of additional bus to reserve on BIOS PCI init.
> >
> > But wouldn't the proper fix be for the PCI bridge to have the subordinate
> > value be extended to fit more bus ranges?
> 
> 
> What do you mean? This is what I'm trying to do. Do you suppose to get rid
> of vendor-specific cap and use original register value instead of it?

I would suggest a simple fix - each bridge has a a number of bus devices
it can use. You have up to 255 - so you split the number of northbridge
numbers by the amount of NUMA nodes (if that is used) - so for example
if you have 4 NUMA nodes, each bridge would cover 63 bus numbers.

Meaning the root bridge would cover 0->63 bus, 64->128, and so on.
That gives you enough space to plug in your plugged in devices
(up to 63).

And if you need sub-briges then carve out a specific range.


> 
> >
> > >
> > > Aleksandr Bezzubikov (2):
> > >   pci: add support for direct usage of bdf for capability lookup
> > >   pci: enable RedHat pci bridges to reserve more buses
> > >
> > >  src/fw/pciinit.c   | 12 ++++++++++--
> > >  src/hw/pcidevice.c | 24 ++++++++++++++++++++++++
> > >  src/hw/pcidevice.h |  1 +
> > >  3 files changed, 35 insertions(+), 2 deletions(-)
> > >
> > > --
> > > 2.7.4
> > >
> > >
> >
> -- 
> Alexander Bezzubikov

  reply	other threads:[~2017-07-19 18:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 13:20 [Qemu-devel] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init Aleksandr Bezzubikov
2017-07-19 13:20 ` [Qemu-devel] [RFC PATCH 1/2] pci: add support for direct usage of bdf for capability lookup Aleksandr Bezzubikov
2017-07-19 14:24   ` Marcel Apfelbaum
2017-07-19 13:20 ` [Qemu-devel] [RFC PATCH 2/2] pci: enable RedHat pci bridges to reserve more buses Aleksandr Bezzubikov
2017-07-19 13:56   ` Konrad Rzeszutek Wilk
2017-07-19 14:30     ` Marcel Apfelbaum
2017-07-19 13:57 ` [Qemu-devel] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init Konrad Rzeszutek Wilk
2017-07-19 17:14   ` Alexander Bezzubikov
2017-07-19 18:18     ` Konrad Rzeszutek Wilk [this message]
     [not found]       ` <CAKSfGUCp=AFDjm24bMOpaSAA5FiDZXO0ZrBvuCp4wT+5EbhqDA@mail.gmail.com>
2017-07-19 18:38         ` [Qemu-devel] Fwd: " Alexander Bezzubikov
2017-07-19 18:56           ` Konrad Rzeszutek Wilk
2017-07-19 19:37             ` Marcel Apfelbaum
2017-07-20  6:52 ` [Qemu-devel] [SeaBIOS] " Gerd Hoffmann
2017-07-21  8:19   ` Marcel Apfelbaum
2017-07-21 10:04     ` Gerd Hoffmann
2017-07-21 12:15       ` Marcel Apfelbaum
2017-07-21 12:42         ` Gerd Hoffmann
2017-07-21 13:40           ` Marcel Apfelbaum
2017-07-24  8:41             ` Gerd Hoffmann
2017-07-21 17:28         ` Kevin O'Connor
2017-07-21 18:21           ` Marcel Apfelbaum
2017-07-24  8:39           ` Gerd Hoffmann

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=20170719181853.GC13096@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=zuban32s@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.