[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 4] get_page_type: Print out extra information when failing to get page_type
>>> Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 08/21/12 10:22 PM >>> >get_page_type: Print out extra information when failing to get page_type. > >When any reference to __get_page_type is called and it fails, we get: > >(XEN) mm.c:2429:d0 Bad type (saw 1400000000000002 != exp 7000000000000000) for >mfn 10e392 (pfn 1bf6c) > >with this patch we get some extra details such as: >(XEN) debug.c:127:d0 cr3: 10d80b000, searching for 10e392 >(XEN) debug.c:111:d0 cr3(10d80b000) has mfn(10e392) in level PUD/L3: [258][272] >(XEN) debug.c:111:d0 cr3(10d80b000) has mfn(10e392) in level PMD/L2: >[258][511][511] >(XEN) debug.c:111:d0 cr3(10d80b000) has mfn(10e392) in level PGD/L4: [272] >(XEN) debug.c:111:d0 cr3(10d80b000) has mfn(10e392) in level PUD/L3: [511][511] > >where it actually is in the pagetable of the guest. This is useful >b/c we can figure out where it is, and use that to figure out where >the OS thinks it is. Hmm, not sure how useful this is: To me, it is first of all non-obvious why there are two instances of L3 here, what the non-consistent indexes really mean, and what the repeated printing of CR3 is good for. >--- a/xen/arch/x86/debug.c Tue Aug 21 16:08:29 2012 -0400 >+++ b/xen/arch/x86/debug.c Tue Aug 21 16:08:29 2012 -0400 Further, putting the code in this file is likely wrong - as it says close to its top, its a helper file for debuggers. >--- a/xen/arch/x86/mm.c Tue Aug 21 16:08:29 2012 -0400 >+++ b/xen/arch/x86/mm.c Tue Aug 21 16:08:29 2012 -0400 >@@ -2422,6 +2422,8 @@ static int __put_page_type(struct page_i >} > > >+extern void dbg_pv_mfn(unsigned long mfn, struct domain *d); >+ >static int __get_page_type(struct page_info *page, unsigned long type, >int preemptible) >{ No extern declarations in C files please. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |