From: Keith Busch <keith.busch@intel.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Roy Shterman <roys@lightbitslabs.com>,
Ofer Hayut <ofer@lightbitslabs.com>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: Questions about pci_bridge_check_ranges()
Date: Tue, 27 Nov 2018 15:39:02 -0700 [thread overview]
Message-ID: <20181127223901.GD6401@localhost.localdomain> (raw)
In-Reply-To: <34458c2d-0faf-e9c1-55fd-7ade553a2b45@grimberg.me>
On Tue, Nov 27, 2018 at 02:22:48PM -0800, Sagi Grimberg wrote:
> Hi,
>
> During a rescan process, pci bridge regions capabilities are
> re-verified. In particular, prefetchable regions are checked for 64-bit
> addressing support. This check is done by reading the base-address
> register 4 LSBs.
>
> Then, we "double check" that the bridge support 64-bit prefetchable
> addresses. This double-check is done by writing ones to the base-address
> buffer (high 32-bit), and check if we read zeros [1].
>
> Questions:
> 1. Why do we need to "double-check"?
> 2. What is expected to happen if a memory transaction arrive to this
> port during this process, while its base-address is miss-configured?
> (say, a read-transaction issued by a peer device)
I think has something to do with how pbus_size_mem() assumes a
64-bit window will not have a 32-bit resource. If a bridge has a
prefetchable window, but happens to contain an address < 4GB, we clear
the IORESOURCE_MEM_64 flag so that it can get a resource.
next prev parent reply other threads:[~2018-11-27 22:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 22:22 Questions about pci_bridge_check_ranges() Sagi Grimberg
2018-11-27 22:39 ` Keith Busch [this message]
2018-12-10 8:49 ` Ofer Hayut
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=20181127223901.GD6401@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=linux-pci@vger.kernel.org \
--cc=ofer@lightbitslabs.com \
--cc=roys@lightbitslabs.com \
--cc=sagi@grimberg.me \
--cc=yinghai@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.