From: Bjorn Helgaas <helgaas@kernel.org>
To: Keith Busch <keith.busch@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
x86@kernel.org, linux-pci@vger.kernel.org,
Jiang Liu <jiang.liu@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Dan Williams <dan.j.williams@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Bryan Veal <bryan.e.veal@intel.com>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [RFC PATCHv2] x86/pci: Initial commit for new VMD device driver
Date: Thu, 8 Oct 2015 08:29:03 -0500 [thread overview]
Message-ID: <20151008132903.GJ27633@localhost> (raw)
In-Reply-To: <alpine.LNX.2.00.1510071546080.23840@localhost.lm.intel.com>
On Wed, Oct 07, 2015 at 04:04:07PM +0000, Keith Busch wrote:
> On Tue, 6 Oct 2015, Keith Busch wrote:
> >On Tue, 6 Oct 2015, Bjorn Helgaas wrote:
> >>>+ resource_list_for_each_entry(entry, &resources) {
> >>>+ struct resource *source, *resource = entry->res;
> >>>+
> >>>+ if (!i) {
> >>>+ resource->start = 0;
> >>>+ resource->end = (resource_size(
> >>>+ &vmd->dev->resource[0]) >> 20) - 1;
> >>>+ resource->flags = IORESOURCE_BUS | IORESOURCE_PCI_FIXED;
> >>
> >>I thought BAR0 was CFGBAR. I missed the connection to a bus number
> >>aperture.
> >
> >Right, BAR0 is the CFGBAR and is the device's aperture to access its
> >domain's config space.
>
> It's a new day, I'll try a new explanation on what this is about. The size
> of the CFGBAR determines how many bus numbers can be reached through the
> device's config space aperture. We are not setting the bus resource to
> BAR0; just determining the bus resource ending based on BAR0's size. We
> expect the bar to be 256M to access config space for 256 buses:
>
> 8 functions * 32 devices * 256 buses * 4k config space per function = 256M
>
> If the BAR wasn't provided 256M for any reason, we reduce the number of
> bus resources this domain can provide.
Yep, that makes sense. A comment here about the fact that BAR0 maps
ECAM space for the new domain might help.
Thanks!
Bjorn
next prev parent reply other threads:[~2015-10-08 13:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 17:44 [RFC PATCHv2] x86/pci: Initial commit for new VMD device driver Keith Busch
2015-10-03 9:45 ` Ingo Molnar
2015-10-05 14:34 ` Keith Busch
2015-10-05 16:46 ` Ingo Molnar
2015-10-05 18:03 ` Keith Busch
2015-10-04 0:29 ` kbuild test robot
2015-10-06 23:14 ` Bjorn Helgaas
2015-10-07 0:21 ` Keith Busch
2015-10-07 16:04 ` Keith Busch
2015-10-08 13:29 ` Bjorn Helgaas [this message]
2015-10-08 13:47 ` Bjorn Helgaas
2015-10-08 21:33 ` Keith Busch
2015-10-09 18:09 ` Bjorn Helgaas
2015-10-09 19:22 ` Keith Busch
2015-10-13 9:57 ` Martin Mares
2015-10-12 21:05 ` Keith Busch
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=20151008132903.GJ27633@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=bryan.e.veal@intel.com \
--cc=dan.j.williams@intel.com \
--cc=hpa@zytor.com \
--cc=jiang.liu@linux.intel.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 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.