From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: Xen's use of PAT and PV guests Date: Tue, 30 Mar 2010 08:44:37 +0100 Message-ID: <4BB1C8050200007800037BCE@vpn.id2.novell.com> References: <4BB1476D.4060209@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4BB1476D.4060209@goop.org> Content-Disposition: inline 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: Xen-devel , Keir Fraser , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org >>> Jeremy Fitzhardinge 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=20 >point though, since I'm not quite sure about the full set of differences= =20 >between WT and WC, and their respective interactions with the MTRR, = and=20 >whether that would break anything. At first glance it seems pretty = safe=20 >though... 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. Jan