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: "Su, Disheng" <disheng.su@xxxxxxxxx>
Subject: Re: [Xen-devel] Guest-vs-Host MTRR/PAT conflict and a crash?
From: "David Stone" <unclestoner@xxxxxxxxx>
Date: Wed, 2 Jan 2008 16:41:50 -0500
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 02 Jan 2008 13:42:28 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=h5ZvBhMK4OG15Ibl+rr557HyF0f7e5KySXsVeYosWdA=; b=pZWoc+wfzWXMU+xXog3b60bzROc3MHr0B5nKmljhYnYjFX2JtPjR8E3zg5/aI5CdvgGROJzX4fXaxMqlLFwG4PSGJ1myma9X3FTinPItY9U6JVziQSfXsaxcd7ENwcF+CwlwOgXINSR4WLPMv/7o68+NO8Rperp8xMn5Yjp2rQs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VTbSxVtwtHVEKBW05TlDfgFlY59DBTctT/HFCzlGfeTiwFsptTUOUxbQBMzohSZsNrqAymcBc0W3RUs1tuVVJJ/jU7F899NO3wf7oD1dDXRGrKTZTYgZh/58zTIC5aVdO2CenpC/3NAOj+WnZuyx898ryJurWoRZOg92Q9xUrJA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <FF386CB4AE0E4648B0A96060EC00F36C5FAC36@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <1a74a8410712121413g12f4d09dobef330bc8be1d98c@xxxxxxxxxxxxxx> <C3861918.1142C%Keir.Fraser@xxxxxxxxxxxx> <1a74a8410712141443r29e31582lccec97c6abc41dd0@xxxxxxxxxxxxxx> <FF386CB4AE0E4648B0A96060EC00F36C5FAC36@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for your response.  I've done a bit more troubleshooting on
this.  Below is the error message again:

> >>> 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..

I know that theoretically the memory cache-type mismatch shouldn't
directly cause a Machine Check, but I can't help but think it's
related...I see the machine check if and only if I see the cache-type
mismatch and they happen in quick succession.

The guest physical address is 0x10000000 as shown above.  I added more
tracing and found that it corresponds to host address 0x80020000.
>From the qemu logs I also found that this is a PCI BAR for my PCI
Express graphics card that I am trying to pass through via IOMMU (see
below)
  pt_register_regions: IO region registered (size=0x00010000
base_addr=0x80020000).
With lspci on Dom0 I confirmed that 0x80020000 is a 64KB region of
address space assigned to the PCI-XP graphics card.  It is marked
non-prefetchable.  (The card also has a 256MB region assigned to it as
prefetchable.)  I also found that both the guest PAT and the guest
MTRR for 0x10000000 classify that address as type 6
(MTRR_TYPE_WRBACK), making the guest effective type also 6.

So my first question is, does anyone have a guess as to what this 64KB
region assigned to the graphics card is for?  I assume the 256MB
region is the general-purpose video memory for textures, vertices,
etc.

The mtrr warning message happens when the shadow page table is getting
updated as the guest is trying to update his page tables.  But why
would the guest only update the PTE at the beginning of the 64KB
region, and not all 64KB/4KB=16 PTEs in the region?  I assume the
guest isn't updating them all, because then I would get 16 of the mtrr
warning messages?  I wonder if the guest is updating the page table
(causing the MTRR warning but succeeding), and then trying to
read/write from that page, and this is timing out causing the machine
check?

Any help is much appreciated!
Dave

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

<Prev in Thread] Current Thread [Next in Thread>