WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH 06/16] xen: disable PAT

To: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 06/16] xen: disable PAT
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Sat, 09 May 2009 09:04:08 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Suresh Siddha <suresh.b.siddha@xxxxxxxxx>, Linux, the arch/x86 maintainers <x86@xxxxxxxxxx>, Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Pallipadi, Venkatesh" <venkatesh.pallipadi@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Lu <yinghai@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Delivery-date: Sat, 09 May 2009 01:04:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090508155031.4403f7e0@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnQbmzcsN7BkIN8SpipbDH09qFsgAADk2gS
Thread-topic: [Xen-devel] Re: [PATCH 06/16] xen: disable PAT
User-agent: Microsoft-Entourage/12.17.0.090302
On 08/05/2009 15:50, "Alan Cox" <alan@xxxxxxxxxxxxxxxxxxx> wrote:

>> Roughly speaking the kernel needs to cope with different values written
>> to MSR_IA32_CR_PAT than the single hard coded value it would write
>> itself if given the chance. Essentially _PAGE_CACHE_* need to become
>> dynamic (or I guess we could change the native layout to match Xen's, I
>> don't know why native differs from the initial state, I guess just to
>> avoid using the PAT bit for some reason.
> 
> Because it is required for some processor variants due to errata. This is
> also why the BIOS has them programmed as a mirror between 0-3 and 4-7.
> 
> I don't think changing Linux here is the right thing to do - if anything
> Xen probably needs to change.

My suggestion is that Xen changes its PAT[1] from WT to WC. AFAIK only
suse's Linux port is currently using Xen's PAT support, and it does not
actually use the WT cache attribute. Then Xen's PAT[0-3] would match what
Linux expects, and Linux apparently does not risk using PAT[4-7] because of
processor errata so their values are irrelevant. Linux can check that it is
running on Xen with suitable PAT setup by reading MSR_IA32_CR_PAT and
checking PAT[0-3], and only enable PAT usage in case of a match.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel