public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: "Andi Kleen" <andi@firstfloor.org>,
	"Cédric Augonnet" <cedric.augonnet@gmail.com>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: PAT support for i386 and x86_64
Date: Tue, 7 Aug 2007 17:33:35 +0200	[thread overview]
Message-ID: <20070807153335.GA1958@one.firstfloor.org> (raw)
In-Reply-To: <6278d2220708070826h2613dd7dr6e3b8001fba3441a@mail.gmail.com>

On Tue, Aug 07, 2007 at 04:26:06PM +0100, Daniel J Blueman wrote:
> (Intel IA32 ASDM 3A 10-47) "a WC page must never be aliased to a
> cacheable page because WC writes may not check the processor caches."

Yes that is what we're trying to avoid, but it is far more complicated
than you think.

> This is not talking about corrupting the cache generally, but data
> hitting a PCI target twice by (ie) a broken driver.

This can end up with data corruption, machine checks or 
a broken device. All happened.

> > > barrier will hamper progress we do see, as it has done already for
> > > years.
> >
> > Because it's not simple and nobody has done it properly yet.
> 
> Providing only UC and WC types and documenting aliasing problems is
> what is required here.

At least the direct mapping needs to be changed too and any mapping
comming from other sources (/sys/bus/pci, /dev/mem etc.) 
Otherwise you get the dangerous illegal aliases.

The chances of a driver getting this right even when documented
are very small.

BTW i had some prototype patches to address some of this,
but they need much more work to handle all this properly.
Just reprogramming the PAT registers is really the smallest issue.
The IA64 port has done some of the work as an example, unfortunately they
use a strange memory mapping scheme that cannot be easily moved
over. iirc Bjorn identified over 10 potential sources of cache aliases
that all needed to be addressed in the end.

-Andi


  reply	other threads:[~2007-08-07 15:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 12:34 PAT support for i386 and x86_64 Daniel J Blueman
2007-08-07 14:10 ` Andi Kleen
2007-08-07 15:26   ` Daniel J Blueman
2007-08-07 15:33     ` Andi Kleen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-07  2:03 [PATCH 0/2] " Cédric Augonnet
2007-08-07  8:30 ` Andi Kleen
2007-08-08  8:26   ` Loic Prylli
2007-08-08 10:14     ` Andi Kleen
2007-08-08 15:52       ` Cédric Augonnet
     [not found]       ` <f56c1ba00708080842i1eaa00kef5071d9a1f01f04@mail.gmail.com>
2007-08-08 16:00         ` Andi Kleen

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=20070807153335.GA1958@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=cedric.augonnet@gmail.com \
    --cc=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox