From: Bjorn Helgaas <helgaas@kernel.org>
To: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Cc: Logan Gunthorpe <logang@deltatee.com>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [nicholas.johnson-opensource@outlook.com.au: [PATCH v6 3/4] PCI: Fix bug resulting in double hpmemsize being assigned to MMIO window]
Date: Thu, 20 Jun 2019 08:43:46 -0500 [thread overview]
Message-ID: <20190620134346.GH143205@google.com> (raw)
In-Reply-To: <SL2P216MB01872DFDDA9C313CA43C7B3280E40@SL2P216MB0187.KORP216.PROD.OUTLOOK.COM>
On Thu, Jun 20, 2019 at 12:44:11AM +0000, Nicholas Johnson wrote:
> Correct me if I am wrong about assumptions about windows. My
> understanding cannot be perfect. As far as I know, 64-bit BARs
> should always be prefetchable,
There's no requirement that a 64-bit BAR be prefetchable.
- BARs of PCIe Functions must be prefetchable unless they have read
side effects or can't tolerate write merging (PCIe r5.0, sec
7.5.1.2.1).
- BARs of PCIe Functions other than Legacy Endpoints must be 64-bit
if they are prefetchable (sec 7.5.1.2.1).
- Bridge non-prefetchable memory windows are limited to 32-bit
(7.5.1.3.8).
- There's some ambiguity in the spec about bridge prefetchable
memory windows. Current specs claim 64-bit addresses must be
supported (sec 7.5.1.3.9), but also say the upper 32 bits are
optional (sec 7.5.1.3.10). Both 32- and 64-bit versions
definitely exist.
> but I own the Aquantia AQC-107S NIC and it has three 64-bit non-pref
> BARs. It happens that they are assigned into the 32-bit window.
This is as it should be. Non-prefetchable windows are 32 bits, and
in general non-prefetchable BARs must be placed there.
There is some wiggle room in pure PCIe systems because PCIe reads
always contain an explicit length, so in some cases it is safe to
put a non-prefetchable BAR in a prefetchable window (see the
implementation note in sec 7.5.1.2.1). But I don't think Linux
currently implements this.
next prev parent reply other threads:[~2019-06-20 13:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <SL2P216MB01874DFDDBDE49B935A9B1B380E50@SL2P216MB0187.KORP216.PROD.OUTLOOK.COM>
2019-06-19 16:21 ` [nicholas.johnson-opensource@outlook.com.au: [PATCH v6 3/4] PCI: Fix bug resulting in double hpmemsize being assigned to MMIO window] Logan Gunthorpe
2019-06-20 0:44 ` Nicholas Johnson
2019-06-20 0:49 ` Logan Gunthorpe
2019-06-23 5:01 ` Nicholas Johnson
2019-06-24 9:13 ` Multitude of resource assignment functions Benjamin Herrenschmidt
2019-06-24 16:45 ` Logan Gunthorpe
2019-06-27 7:40 ` Nicholas Johnson
2019-06-27 8:48 ` Benjamin Herrenschmidt
2019-06-30 2:40 ` Nicholas Johnson
2019-06-27 16:35 ` Logan Gunthorpe
2019-06-27 20:26 ` Benjamin Herrenschmidt
2019-06-30 2:57 ` Nicholas Johnson
2019-07-01 4:33 ` Oliver O'Halloran
2019-07-02 21:39 ` Bjorn Helgaas
2019-07-03 13:43 ` Nicholas Johnson
2019-07-03 14:19 ` Bjorn Helgaas
2019-07-03 22:54 ` Benjamin Herrenschmidt
2019-06-20 13:43 ` Bjorn Helgaas [this message]
2019-06-20 23:24 ` [nicholas.johnson-opensource@outlook.com.au: [PATCH v6 3/4] PCI: Fix bug resulting in double hpmemsize being assigned to MMIO window] Benjamin Herrenschmidt
2019-06-27 7:50 ` Nicholas Johnson
2019-06-27 16:54 ` Logan Gunthorpe
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=20190620134346.GH143205@google.com \
--to=helgaas@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=nicholas.johnson-opensource@outlook.com.au \
/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).