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