From: "Christoph Egger" Subject: [PATCH] fix for recursive PTEs Date: Fri, 19 Oct 2007 10:09:46 +0200 Message-ID: <200710191009.46754.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_KZGGH1O6jzKpACL" 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=_KZGGH1O6jzKpACL Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! =46ix Xen kernel to silence a message on recursive Page Table Entries for level >=3D 3. Signed-off-by: Christoph Egger Keir: Please also apply this to Xen 3.1.2 if it's not too late for this. =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=_KZGGH1O6jzKpACL Content-Type: text/plain; charset=iso-8859-1; name=xen_mm.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_mm.diff diff -r 2372f89c0447 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Mon Oct 15 12:24:35 2007 +0100 +++ b/xen/arch/x86/mm.c Fri Oct 19 10:00:53 2007 +0200 @@ -1769,15 +1769,26 @@ int get_page_type(struct page_info *page nx |= PGT_validated; } } - else if ( unlikely((x & (PGT_type_mask|PGT_pae_xen_l2)) != type) ) - { - if ( ((x & PGT_type_mask) != PGT_l2_page_table) || - (type != PGT_l1_page_table) ) - MEM_LOG("Bad type (saw %" PRtype_info - " != exp %" PRtype_info ") " - "for mfn %lx (pfn %lx)", - x, type, page_to_mfn(page), - get_gpfn_from_mfn(page_to_mfn(page))); + else if (unlikely((x & (PGT_type_mask|PGT_pae_xen_l2)) != type) ) + { + /* + * if it's a recursive mapping failure here is expected. + * Don't log it + */ + if ((x & PGT_type_mask) == PGT_l2_page_table && + type == PGT_l1_page_table) + return 0; + if ((x & PGT_type_mask) == PGT_l3_page_table && + type == PGT_l2_page_table) + return 0; + if ((x & PGT_type_mask) == PGT_l4_page_table && + type == PGT_l3_page_table) + return 0; + MEM_LOG("Bad type (saw %" PRtype_info + " != exp %" PRtype_info ") " + "for mfn %lx (pfn %lx)", + x, type, page_to_mfn(page), + get_gpfn_from_mfn(page_to_mfn(page))); return 0; } else if ( unlikely(!(x & PGT_validated)) ) --Boundary-00=_KZGGH1O6jzKpACL 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=_KZGGH1O6jzKpACL--