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


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

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Xen's use of PAT and PV guests
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 30 Mar 2010 18:56:15 +0100
Cc: Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, Konrad
Delivery-date: Tue, 30 Mar 2010 10:57:06 -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>
Organization: Citrix Systems, Inc.
References: <4BB1476D.4060209@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2010-03-30 at 01:35 +0100, Jeremy Fitzhardinge wrote:

> 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 had a patch ages ago (which I have now lost) that caused the kernel to
read back the PAT MSR after writing it and try and locate a suitable
entry for each cache setting it was interested in (with fallbacks as
appropriate) to use dynamically thereafter.

This has the nice property that Linux could write what it really wanted
to the PAT register but it would then read and use whatever it actually
ended up with.

I'm not sure that this scheme is at all upstreamable though.


Xen-devel mailing list