From: Robert Hancock <hancockr@shaw.ca>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Olivier Galibert <galibert@pobox.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@suse.de>, Chuck Ebbert <cebbert@redhat.com>,
Len Brown <lenb@kernel.org>
Subject: Re: [RFC PATCH] PCI MMCONFIG: add validation against ACPI motherboard resources
Date: Wed, 23 May 2007 17:04:58 -0600 [thread overview]
Message-ID: <4654C89A.9000604@shaw.ca> (raw)
In-Reply-To: <alpine.LFD.0.98.0705231257050.3890@woody.linux-foundation.org>
Linus Torvalds wrote:
>
> On Wed, 23 May 2007, Jesse Barnes wrote:
>> Fixed it (finally). I don't think moving the 64 bit probing around
>> would make a difference, since we'd restore its original value anyway
>> before moving on to the 32 bit probe which is where I think the problem
>> is.
>
> Well, the thing is, I'm pretty sure there is at least one northbridge that
> stops memory accesses from the CPU when you turn off the MEM bit on it.
> Oops, you just killed the machine.
Which is retarded, since the command bits are only supposed to be for
memory ranges that are part of the BARs, it's not supposed to completely
kill the device function. Unless somehow the memory on that system is
accessed through the PCI bus or something. Anyway, it's something we
have to deal with.
>
> Looking at the 925X datasheet (which I happened to have around in my
> google search history because of the discussions of the sky2 DMA
> problems), it looks like at least that one just hardcodes the MEM bit to
> be 1, and thus writing to it is a total no-op.
>
> But I really think that clearing the MEM bit for at least the host bridge
> is conceptually quite wrong, even if it might turn out that all chipsets
> end up just saying (like Intel) "screw it, the user is insane, we're not
> going to actually do what he asks us to do".
>
> Do we really want to be that insane? Turn off memory accesses when probing
> the CPU host bridge?
>
> So at a _minimum_ I would say that that thing needs to be more careful
> about host bridges. Maybe it's not needed, who knows?
I think we should likely avoid disabling the command bits on host
bridges (maybe any bridge) due to this risk of disabling something that
will break things. Ideally we can get around this without doing any
disabling at all, as noted in my last email.
>
>> Linus, since you were the one concerned about breaking working setups,
>> what do you think? Should we use this approach, or specifically quirk
>> out cases where mmconfig space might conflict with BAR probing?
>
> So see above. I think at a minimum, we should consider the host bridge
> special.
>
> I also suspect that we'd be simply better off if we didn't use mmconfig at
> all unless we _have_ to. Why use mmconfig for the standard BAR accesses?
> Is there really any reason? I can understand using it for extended config
> space, since then the old-fashioned approach won't work. But for normal
> accesses? What's the point, really?
Why not? Either you trust that the MMCONFIG is working or you don't. If
you trust it, you might as well use it for everything, and if you don't,
you can't risk using it for anything. If there are problems that show up
only with MMCONFIG, doing what you propose would simply cover them up
until somebody actually tried accessing extended config space.
> mmconfig seems to be fundamentally designed to be impossible to bootstrap
> off, so there's no way you can have a machine that _only_ supports
> mmconfig. So why do people seem to think it's so wonderful? Please fill me
> in on this fundamental mystery.
Sure you can bootstrap off it, you just need to have some way to know
where to find it (either ACPI or some other system-specific mechanism).
>
> Quite frankly, if we just didn't use mmconfig, the whole issue would go
> away. Isn't _that_ the much better solution?
I don't think that is going to be viable in the long run now that
Windows Vista is out and MS is actually encouraging HW developers to
allow using that config space..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
next prev parent reply other threads:[~2007-05-23 23:05 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 2:14 [RFC PATCH] PCI MMCONFIG: add validation against ACPI motherboard resources Robert Hancock
2007-04-30 2:59 ` Randy Dunlap
2007-04-30 22:59 ` Olivier Galibert
2007-04-30 23:26 ` Robert Hancock
2007-05-01 16:48 ` Jesse Barnes
2007-05-02 2:41 ` Jesse Barnes
2007-05-02 2:56 ` Jesse Barnes
2007-05-02 5:27 ` Jesse Barnes
2007-05-02 14:34 ` Robert Hancock
2007-05-02 17:57 ` Jesse Barnes
2007-05-02 23:45 ` Robert Hancock
2007-05-02 23:54 ` Jesse Barnes
2007-05-04 21:06 ` Jesse Barnes
2007-05-05 0:22 ` Robert Hancock
2007-05-21 19:10 ` Jesse Barnes
2007-05-21 19:26 ` Robert Hancock
2007-05-21 20:07 ` Jesse Barnes
2007-05-21 20:22 ` Jesse Barnes
2007-05-23 0:31 ` Robert Hancock
2007-05-23 0:38 ` Jesse Barnes
2007-05-23 0:53 ` Robert Hancock
2007-05-23 0:56 ` Jesse Barnes
2007-05-23 1:06 ` Robert Hancock
2007-05-23 18:52 ` Jesse Barnes
2007-05-23 20:20 ` Linus Torvalds
2007-05-23 20:38 ` Alan Cox
2007-05-23 20:45 ` Linus Torvalds
2007-05-23 20:49 ` Jesse Barnes
2007-05-23 20:56 ` Linus Torvalds
2007-05-23 21:03 ` Jesse Barnes
2007-05-23 21:09 ` Jeff Garzik
2007-05-23 21:35 ` Alan Cox
2007-05-23 21:35 ` Jeff Garzik
2007-05-23 21:37 ` Jesse Barnes
2007-05-23 21:42 ` Jeff Garzik
2007-05-23 23:07 ` Stephen Hemminger
2007-05-23 21:54 ` Linus Torvalds
2007-05-23 22:06 ` Jesse Barnes
2007-05-23 22:16 ` Linus Torvalds
2007-05-23 22:28 ` Jesse Barnes
2007-05-23 23:04 ` David Miller
2007-05-23 23:11 ` Jesse Barnes
2007-05-23 23:15 ` Robert Hancock
2007-05-23 23:21 ` Jesse Barnes
2007-05-23 21:20 ` Jesse Barnes
2007-05-23 22:24 ` Olivier Galibert
2007-05-23 22:31 ` Jesse Barnes
2007-05-23 22:48 ` Linus Torvalds
2007-05-23 22:55 ` Jesse Barnes
2007-05-24 0:21 ` Linus Torvalds
2007-05-24 2:59 ` Jesse Barnes
2007-05-24 3:18 ` Linus Torvalds
2007-05-24 3:20 ` Linus Torvalds
2007-05-24 3:40 ` Jesse Barnes
2007-05-24 5:19 ` Robert Hancock
2007-05-24 6:18 ` Jeff Garzik
2007-05-24 15:42 ` Linus Torvalds
2007-05-23 23:04 ` Robert Hancock [this message]
2007-05-23 23:04 ` Robert Hancock
2007-05-23 23:06 ` Jesse Barnes
2007-05-24 0:02 ` Jesse Barnes
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=4654C89A.9000604@shaw.ca \
--to=hancockr@shaw.ca \
--cc=ak@suse.de \
--cc=cebbert@redhat.com \
--cc=galibert@pobox.com \
--cc=jbarnes@virtuousgeek.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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