From: Loic Prylli <loic@myri.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org, gregkh@suse.de,
linux-pci@atrey.karlin.mff.cuni.cz,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [patch] Make MMCONFIG space (extended PCI config space) a driver opt-in issue
Date: Sun, 23 Dec 2007 03:33:25 -0500 [thread overview]
Message-ID: <476E1D55.6090003@myri.com> (raw)
In-Reply-To: <476DF5BE.5030004@garzik.org>
On 12/23/2007 12:44 AM, Jeff Garzik wrote:
>>
>> By possibly using different implementations for the two ranges you avoid
>> introducing a new API, you avoid taking risks with mmconf when you don't
>> need it. That doesn't preclude using mmconf for everything either if the
>> user requests it or based on enough knowledge of the system to be sure
>> nothing will break.
>
> Are you prepared to guarantee that freely mixing mmconfig and type1
> config accesses at runtime will always work, on all chipsets? I'm
> talking about silicon here, not kernel software.
Your question is whether I expect a mix of type1 (for legacy conf space)
and mmconfig (for >= 256) to trigger some bug in silicon causing
flakiness (why not possible random corruption) that would not happen
when only using type1 or mmconfig.
Obviously, I cannot prove or guarantee the absence of subtle silicon
bugs. But I can say:
- documentation is saying mixing them is OK, pci-express docs insists
on paying attention to ordering when mixing (which is easy on x86),
acknowledging one is able to mix them.
- All current kernels have been using a mix of "type1" and "mmconf"
accesses to the same device even if that's only used during mmconfig
initialization.
- On amd platforms with typical combination on mmconf-aware and
non-mmconf aware chipsets, you always have a mix of "type1" and "mmconf"
accesses all the time with standard kernels (not on the same bus)
- Mixing such accesses on the same device at runtime has happened on
thousands of systems for Myricom device/software users.
Are you prepared to guarantee no processor will ever have a wierd
silicon problem that's triggered by any Linux change?
Mixing mmconf/type-1 is an approach that any mmconf-able hardware is
supposed to support, it has been tried on at least most
server/workstation chipsets typically used in the last two years, so the
burden of proof is on actually finding some silicon that cannot do that
properly before rejecting that based on hardware fears (otherwise you
go on a slippery slope).
>
> Furthermore, is it best for our users to find problems with mixed
> config accesses -- not at boot time, not at driver load time, but at
> some random time when some random driver does its first extended
> config space access? IMO, no. If you are going to fail, failing in a
> predictable, visible way is best.
A failure happening during driver initialization or some very specific
identifiable driver event (the first ext-conf-space access is not
something popping randomly in the life of a driver) is predictable and
visible. I am not sure what kind of problem you are afraid of anyway
(ext-conf-space not available?), so it's hard to talk generally.
Needless to say, I never said to not to test mmconf on all pci-express
devices advertised in MCFG during initialization time (preferably after
all PCI-memory-space initialization is done since there is uncertainty
about whether mmconf might conflict with that in some corner cases).
>
> Failures are more predictable and more consistent with an all-or-none
> scenario. The all-or-none solutions are the least complex on the
> software side, and far more widely tested than any mixed config access
> scheme.
Disabling altogether ext-conf-space access by default (that's the
default your propose, right? ) is definitely the safest approach. But
that's the least useful too.
Caricaturing, I am the one advocating the real all-or-none scenario:
always use type1 for legacy conf-space (never mmconf). You are saying
that for the legacy-conf-space access, some people should use mmconf and
other people should use type1 based on their kernel configuration or
command-line, and that use depends on something unrelated (whether they
feel they might need extended-conf-space access at some point, be it
even for lspci/setpci).
Loic
next prev parent reply other threads:[~2007-12-23 8:34 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-22 12:31 [patch] Make MMCONFIG space (extended PCI config space) a driver opt-in issue Arjan van de Ven
2007-12-22 12:35 ` [patch] opt the sky2 driver into using extended config space Arjan van de Ven
2007-12-22 20:28 ` Stephen Hemminger
2007-12-22 14:20 ` [patch] Make MMCONFIG space (extended PCI config space) a driver opt-in issue Jeff Garzik
2007-12-22 14:47 ` Arjan van de Ven
2007-12-22 15:54 ` Matthew Wilcox
2007-12-22 16:02 ` Arjan van de Ven
2007-12-22 21:10 ` Matthew Wilcox
2007-12-23 23:33 ` Benjamin Herrenschmidt
2007-12-22 18:06 ` Linus Torvalds
2007-12-22 19:30 ` Martin Mares
2007-12-22 20:15 ` Arjan van de Ven
2007-12-22 20:36 ` Martin Mares
2007-12-23 1:29 ` Jeff Garzik
2007-12-23 1:26 ` Jeff Garzik
2007-12-23 3:46 ` Linus Torvalds
2007-12-23 4:11 ` Jeff Garzik
2007-12-23 4:35 ` Linus Torvalds
2007-12-23 4:52 ` Jeff Garzik
2007-12-23 5:00 ` Linus Torvalds
2007-12-23 5:09 ` Jeff Garzik
2007-12-23 21:09 ` Benjamin Herrenschmidt
2007-12-23 21:15 ` Martin Mares
2007-12-23 22:32 ` Ivan Kokshaysky
2007-12-23 23:06 ` Benjamin Herrenschmidt
2007-12-23 23:19 ` Benjamin Herrenschmidt
2007-12-23 5:27 ` Loic Prylli
2007-12-23 5:44 ` Jeff Garzik
2007-12-23 8:33 ` Loic Prylli [this message]
2007-12-23 11:03 ` Ivan Kokshaysky
2007-12-23 17:32 ` Linus Torvalds
2007-12-24 7:31 ` Jeff Garzik
2007-12-24 18:51 ` Linus Torvalds
2007-12-24 21:22 ` Matthew Wilcox
2007-12-27 11:46 ` Jeff Garzik
2007-12-27 14:09 ` Arjan van de Ven
2007-12-24 7:22 ` Jeff Garzik
2007-12-24 15:47 ` Ivan Kokshaysky
2007-12-23 21:13 ` Benjamin Herrenschmidt
2007-12-23 10:33 ` Arjan van de Ven
2007-12-24 7:04 ` Jeff Garzik
2007-12-24 11:49 ` Arjan van de Ven
2007-12-24 11:54 ` Jeff Garzik
2007-12-24 12:00 ` Arjan van de Ven
2007-12-25 9:22 ` Martin Mares
2007-12-25 9:40 ` Martin Mares
2007-12-23 4:13 ` Jeff Garzik
2007-12-23 4:18 ` Jeff Garzik
2007-12-23 4:44 ` Linus Torvalds
2007-12-23 5:04 ` Jeff Garzik
2007-12-23 5:18 ` Linus Torvalds
2007-12-23 5:22 ` Jeff Garzik
2007-12-23 4:40 ` Linus Torvalds
2007-12-23 10:18 ` Martin Mares
2007-12-23 5:09 ` Loic Prylli
2007-12-23 5:57 ` H. Peter Anvin
2007-12-23 1:34 ` Jeff Garzik
2007-12-22 20:43 ` Benjamin Herrenschmidt
[not found] <fa.pFsY/52FEkQYqrDPnPMxmcUOsRY@ifi.uio.no>
2007-12-22 16:22 ` Robert Hancock
2007-12-22 19:25 ` Greg KH
2007-12-23 0:56 ` Jeff Garzik
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=476E1D55.6090003@myri.com \
--to=loic@myri.com \
--cc=arjan@infradead.org \
--cc=benh@kernel.crashing.org \
--cc=gregkh@suse.de \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=torvalds@linux-foundation.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