lkml.org 
[lkml]   [2010]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/12] xen/mtrr: Add mtrr_if support for Xen mtrr
 On 09/28/2010 11:19 AM, H. Peter Anvin wrote:
> On 09/28/2010 11:13 AM, Jeremy Fitzhardinge wrote:
>> On 09/28/2010 10:56 AM, H. Peter Anvin wrote:
>>> On 09/28/2010 10:13 AM, Jeremy Fitzhardinge wrote:
>>>> Yes, we could just mask out the MTRR CPU feature and rely entirely on PAT.
>>>>
>>>> The alternative would be to use the wrmsr hooks to emulate the Intel
>>>> MTRR registers by mapping them to hypercalls, but that seems needlessly
>>>> complex.
>>>>
>>> Indeed. Relying on pure PAT is the Right Thing[TM].
>> Is there a plan to formally deprecate /proc/mtrr and the kernel
>> infrastructure behind it?
>>
> No, and we really can't do it for a couple of reasons:
>
> a) Pre-PAT hardware;
> b) MTRRs and PAT interact on hardware;
> c) MTRRs, but not PAT, interact with SMM.

What about pre-PAT software (ie, X servers which still use /proc/mtrr)?

> However, since a virtual machine like Xen doesn't have these issues, it
> doesn't apply

Well, we're specifically talking about a virtual machine which has
direct access to hardware, so it is concerned about the real physical
memory properties of real physical pages. If we can assume that
BIOS/Xen will always set up MTRR correctly then there shouldn't be any
need for the kernel to modify the MTRR itself. How true is that in
general? I don't know, but if we could rely on BIOS then there'd never
be a need to touch MTRR, would there?

J


\
 
 \ /
  Last update: 2010-09-28 20:27    [W:0.991 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site