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

[Xen-devel] [PATCH] Update cr3 in PAE mode when guest walk succeed but s

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Update cr3 in PAE mode when guest walk succeed but shadow walk fails
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Fri, 16 Oct 2009 14:09:20 +0100
Delivery-date: Fri, 16 Oct 2009 06:10:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=GcvgDPHbbpJx6M+YQel9n5Wz86due90ZumD+KGQEtwM=; b=nzzZUju6JWstt26hQYGcwt3hj2YoanXgeo0ivE89uxiOaicQuENukbDoC+9p7XhHBJ my2/WEp8dKh06C0KgoY3wHRbyTpUb5OplUSF99Hmwqb28f6fLhIyZQcp8nJs2QuZps3k mM1b+p58kGTBCszvbF/QtNC2DynVpbcmQaDXY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=Y3qEmqy4fOcm/FpMDZHRGqzXXNURRuwvop3bw2pjWhUvo+CjQjqI6TjxevyDekQQmI RXm/j+8RtFvPcQdM3bc5Mo3tTJt6mlDFPuq6mHv4d6h7NeKAVJdHPx0von3/2poMs0FH AsdicgFMViSyqrTF8H/X+CGTvD0I0q1iWyue8=
Envelope-to: www-data@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
When running in PAE mode, Windows 7 (apparently) will occasionally
switch cr3 with one of the L3 entries invalid, make it valid, and then
expect the hardware to load the new value.  (This behavior is
explicitly not promised in the hardware manuals.)  This leads to a
situation where on a shadow fault, the guest walk succeeds but the
shadow walk fails.  The code assumes this can only happen when the
domain is dying, and makes an ASSERT() to that effect.  So currently,
in debug mode, this will cause the host to crash; in non-debug mode,
this will cause a page-fault loop.

The attached patch solves the problem by calling update_cr3() in that
path when the guest is in PAE mode, and only ASSERT()ing when the
guest is not in PAE mode.  The guest will get one spurious page fault,
but subsequent accesses will succeed.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

Attachment: 20091016-update-cr3-on-shadow-failure.diff
Description: Text Data

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