lkml.org 
[lkml]   [2008]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git head] X86_PAT & mprotect
On Sat, May 10, 2008 at 8:20 AM, Pallipadi, Venkatesh
<venkatesh.pallipadi@intel.com> wrote:
>
>
>
> >-----Original Message-----
> >From: Dave Airlie [mailto:airlied@gmail.com]
> >Sent: Friday, May 09, 2008 3:11 PM
> >To: Pallipadi, Venkatesh
> >Cc: Ingo Molnar; Hugh Dickins; Frans Pop; Barnes, Jesse;
> >linux-kernel@vger.kernel.org; Packard, Keith; Yinghai Lu;
> >Andrew Morton; Linus Torvalds; H. Peter Anvin; Thomas
> >Gleixner; Nick Piggin; Jesse Barnes
> >Subject: Re: [git head] X86_PAT & mprotect
> >
> >On Sat, May 10, 2008 at 6:05 AM, Venki Pallipadi
> ><venkatesh.pallipadi@intel.com> wrote:
> >> On Fri, May 09, 2008 at 12:08:18PM +0200, Ingo Molnar wrote:
> >> >
> >> > * Venki Pallipadi <venkatesh.pallipadi@intel.com> wrote:
> >> >
> >> > > > I've tried doing it slightly differently below, don't
> >know whether
> >> > > > you'll consider it an improvement or not.
> >> > >
> >> > > Hugh: Thanks for looking into this. Yes. I like your
> >modified patch.
> >> > > Simpler and smaller.
> >> >
> >> > i have stuck your original patch into testing and nothing
> >blew up so
> >> > far. Due to the mm/ bits this is not for the scope of x86.git, but
> >> > obviously it all looks good and is .26-worthy to me:
> >> >
> >> > Acked-by: Ingo Molnar <mingo@elte.hu>
> >> > Tested-by: Ingo Molnar <mingo@elte.hu>
> >> >
> >> > Venki, could you please send a full patch against -git that has
> >> > everything from Hugh included, with an updated changelog, for
> >> > Linus/Andrew to ack/apply?
> >> >
> >>
> >> Ingo,
> >>
> >> Split up the patch into two parts as the pci part was
> >unrelated to mprotect
> >> problem in a sense.
> >>
> >> Here is the first patch.
> >>
> >> Thanks,
> >> Venki
> >>
> >>
> >> Some versions of X used the mprotect workaround to change
> >caching type from
> >>
> >> UC to WB, so that it can then use mtrr to program WC for
> >that region [1].
> >> Change the mmap of pci space through /sys or /proc
> >interfaces from UC to
> >> UC_MINUS. With this change, X will not need to use mprotect
> >> workaround to get WC type.
> >> Also the bug with mprotect which lets caller to change PAT
> >bits is fixed in
> >> the follow on patch. So, this X workaround will stop
> >working as well.
> >>
> >
> >Wow this kinda puts X in a nasty position, we have 2.6.25 and
> >previous kernels
> >where we use the original /sys interfaces and nasty hack to
> >workaround, but on 2.6.26 we magically need to
> >switch to the /sys _uc interfaces or the users X will slow down.
> >
>
> No. With 2.6.26 you can still use same /sys resource file, without
> the mprotect workaround and set the MTRR as before.
>
> The change from UC to UC_MINUS in this patch ensures that the
> X drivers MTRR will take precedence and X does not need any mprotect
> hacks.
>

Cool just making sure.

Keithp, I hope we didn't error check the mremap return values :)

Dave.


\
 
 \ /
  Last update: 2008-05-10 08:23    [W:0.063 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site