From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH] Allow 32bit PAE guests to change their L3 entries Date: Mon, 18 Feb 2008 13:32:51 +0100 Message-ID: <200802181332.51143.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_zrXuH9tjx9ypZNz" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_zrXuH9tjx9ypZNz Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! adjust_guest_l3e() adds (_PAGE_USER|_PAGE_RW) to the entry, and then get_page_from_l3e() checks that _PAGE_USER or _PAGE_RW are not present for PAE guests. get_page_from_l3e() will always fail at this point for PAE guests. Attached patch fixes this. This bug has been uncovered with NetBSD 32bit PA= E=20 guests. Patch from Manuel Bouyer for xen-3.1-testing, ported to xen-unstable by me. Signed-off-by: Christoph Egger Keir: Please apply this patch also to xen-3.2-testing and xen-3.1-testing. =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_zrXuH9tjx9ypZNz Content-Type: text/plain; charset=us-ascii; name=xen_mm.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_mm.diff diff -r 819399d0bdb1 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Fri Feb 15 14:16:42 2008 +0000 +++ b/xen/arch/x86/mm.c Mon Feb 18 10:55:18 2008 +0100 @@ -1567,14 +1567,14 @@ static int mod_l3_entry(l3_pgentry_t *pl return 0; } - adjust_guest_l3e(nl3e, d); - /* Fast path for identical mapping and presence. */ if (!l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT)) return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad); if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) ) return 0; + + adjust_guest_l3e(nl3e, d); if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad)) ) --Boundary-00=_zrXuH9tjx9ypZNz Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_zrXuH9tjx9ypZNz--