From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: Xen's use of PAT and PV guests Date: Tue, 30 Mar 2010 18:56:15 +0100 Message-ID: <1269971775.2490.88.camel@localhost.localdomain> References: <4BB1476D.4060209@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BB1476D.4060209@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Rzeszutek Wilk , Xen-devel , Keir Fraser , Jan Beulich , Konrad List-Id: xen-devel@lists.xenproject.org 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. Ian.