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

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

To: Ingo Molnar <mingo@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH 06/16] xen: disable PAT
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 8 May 2009 13:38:31 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, arch/x86 maintainers <x86@xxxxxxxxxx>, Siddha <suresh.b.siddha@xxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>, "Pallipadi, Venkatesh" <venkatesh.pallipadi@xxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Suresh, the, Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Delivery-date: Mon, 11 May 2009 06:43:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090508111432.GF11596@xxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <1241730653-4688-1-git-send-email-jeremy@xxxxxxxx> <1241730653-4688-7-git-send-email-jeremy@xxxxxxxx> <20090508111432.GF11596@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2009-05-08 at 07:14 -0400, Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> 
> > From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > 
> > Impact: disable PAT under Xen
> > 
> > Xen imposes a particular PAT layout on all paravirtual guests which
> > does not match the layout Linux would like to use.
> > 
> > Force PAT to be disabled until this is resolved.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> 
> hm, what will the resolution be?

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).

The various mappings used are:
        PAT PCD PWT     NATIVE  XEN     BIOS    INIT
        0   0   0       WB      WB      WB      WB
        0   0   1       WC      WT      WT      WT
        0   1   0       UC-     UC-     UC-     UC-
        0   1   1       UC      UC      -       UC
        1   0   0       -       WC      WB      WB
        1   0   1       -       WP      WT      WT
        1   1   0       -       -       UC-     UC-
        1   1   1       -       -       -       UC-
(INIT is the processors initial state and BIOS is apparently commonly
set by the BIOS).

At the time this changeset was originally written using the actual PAT
bit (required by Xen's layout to get at WC) led to strange errors (to do
with swap masking various bits IIRC) but I believe those have been fixed
since by Jan Beulich.

I'm not sure how _PAGE_PAT_LARGE fits in -- native cunning avoids having
to worry about it by not using the PAT bit at all.

Ian.



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