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] Guest-vs-Host MTRR/PAT conflict and a crash?

To: David Stone <unclestoner@xxxxxxxxx>, Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Guest-vs-Host MTRR/PAT conflict and a crash?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 12 Dec 2007 23:02:48 +0000
Delivery-date: Wed, 12 Dec 2007 14:56:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1a74a8410712121413g12f4d09dobef330bc8be1d98c@xxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acg9Exz7W8mfs6kGEdyM1gAWy6hiGQ==
Thread-topic: [Xen-devel] Guest-vs-Host MTRR/PAT conflict and a crash?
User-agent: Microsoft-Entourage/11.3.6.070618
On 12/12/07 22:13, "David Stone" <unclestoner@xxxxxxxxx> wrote:

> root@localhost xen]# (XEN) mtrr.c:552:d1 Conflict occurs for a given
> guest l1e flags:63 at 10000000 (the effective mm type:6), because the
> host mtrr type is:0
> (XEN) CPU 1: Machine Check Exception: 0000000000000005
> (XEN) Bank 0: b200004000000800
> (XEN) Bank 5: b200121020080400
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 1:
> (XEN) CPU context corrupt****************************************
> (XEN)
> (XEN) Reboot in five seconds..

That looks like the CPU toasted itself. Bits 0-16 == 0x0400 in a
machine-check status register means 'CPU internal timer error'. Perhaps this
#MC means something else in the context of VT-d though? We probably need
someone from Intel to help decode what happened here.

> I guess my question is can someone give a higher-level explaination of
> how MTRR/PAT is supposed to work between Xen (the real MTRRs and real
> PATs in the real ("shadow") PTEs) and an HVM DomU (virtual MTRRs and
> fake PATs in the fake PTEs)?

You pretty much described it yourself. It tries to pick a shadow-pte PAT
value which, coupled with the physical MTRR value for that physical address,
will give the same cache attribute as the guest virtual PAT/MTRR
combination. If it can't find a match (not entirely unlikely I suspect) then
we print a warning and fall back to UC. This code is quite 'fresh' and
definitely open for changes based on real-world testing.

 -- Keir



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