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

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

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Xen's use of PAT and PV guests
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 30 Mar 2010 11:43:06 -0700
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Tue, 30 Mar 2010 11:44:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100330165713.GA7439@xxxxxxxxxxxxxxxxxxx>
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> <20100330165713.GA7439@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3
On 03/30/2010 09:57 AM, Konrad Rzeszutek Wilk wrote:
On Mon, Mar 29, 2010 at 05:35:57PM -0700, Jeremy Fitzhardinge wrote:
I'm looking again at what it will take to reconcile Xen's PAT setup with
the standard Linux one so that we can enable PAT use in pvops kernels.

Just for reference, this is the Linux vs Xen vs default PAT setups:
And this LKML is good a primer:

http://www.linuxsymposium.org/archives/OLS/Reprints-2008/pallipadi-reprint.pdf

Thanks, just what I was looking for.

Index   PTE flags       Linux   Xen     Default
0                       WB      WB      WB
1               PWT     WC      WT      WT
2           PCD         UC-     UC-     UC-
3           PCD PWT     UC      UC      UC
4       PAT             WB      WC      WB
5       PAT     PWT     WC      WP      WT
6       PAT PCD         UC-     UC      UC-
7       PAT PCD PWT     UC      UC      UC


Originally I was thinking of a moderately complex scheme in which an ELF
node on the dom0 kernel could determine the system-wide Xen PAT MSR, and
then the kernel ELF notes on subsequent domains would determine whether
the PAT CPU feature flag is enabled or not.

However this has several problems:

   1. it is fairly complex
   2. if dom0 sets the PAT configuration to something strange, it may
      completely break other PV guests entirely (since it might
      effectively change the meaning of PCD+PWT globally)
How does this work on pages shared across domains? Say Guest A makes the
page WC,Dom0 makes it WB and Xen puts it in WC, and Dom0 reads does a
Write/Read/Write, but in actuallity it is a Read/Write/Write. Or is
there no danger there since the grant table pages have UC set on them?

Not sure. That would invoke undefined behaviour, I'd assume. Does Xen keep track of memory type aliases? Grant pages don't have to be UC do they? Pages between front and backends don't need to be (and shouldn't be) UC.

The graphics cards (and the XServer) are the ones that come in my mind
as heavy users of having this "just right".  But in most (all?) cases
they want it to be UC or better UC- so that shouldn't affect this.

Hm, I don't want to try out-guessing Linux's use of all these modes; we need to either get it right or not try.

    J

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