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/
Home Products Support Community News


[Xen-devel] Re: Xen's use of PAT and PV guests

To: "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: Xen's use of PAT and PV guests
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 30 Mar 2010 08:44:37 +0100
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 30 Mar 2010 00:44:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BB1476D.4060209@xxxxxxxx>
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>
References: <4BB1476D.4060209@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 30.03.10 02:35 >>>
>It therefore seems to me that if I make Linux:
>   1. never set the PAT flag (which it won't anyway),
>   2. check that the value written to IA32_PAT is as expected, but
>      otherwise ignore it, and
>   3. use WT rather than WC
>then it all should just work.  I'm not completely confident in the third 
>point though, since I'm not quite sure about the full set of differences 
>between WT and WC, and their respective interactions with the MTRR, and 
>whether that would break anything.  At first glance it seems pretty safe 

No. For one, while WT is cachable (for reads), WC isn't.

Second, when the MTRRs indicate WC, using WT from PAT is not
recommended (and was earlier documented as undefined behavior).

Third, performance would likely suffer (MTRR-{WC,UC} + PAT-WT -> UC
whereas MTRR-{WC,UC} + PAT-WC -> WC).

Plus all of this would need revisiting once Linux decides to use WT
or WP.


Xen-devel mailing list