[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] x86: make show_page_walk() more robust.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1204711331 0 # Node ID f22cadec48feec2024028b5bb7e729e5ce9d033b # Parent 4f62147e39e89c189ca8d996a8ee6eb6e41bc6c6 x86: make show_page_walk() more robust. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> xen-unstable changeset: 16879:1a2f557448cf5de825d40e550140637961d2eb46 xen-unstable date: Thu Jan 24 18:11:44 2008 +0000 --- xen/arch/x86/x86_32/traps.c | 6 +++--- xen/arch/x86/x86_64/traps.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff -r 4f62147e39e8 -r f22cadec48fe xen/arch/x86/x86_32/traps.c --- a/xen/arch/x86/x86_32/traps.c Mon Mar 03 13:40:08 2008 +0000 +++ b/xen/arch/x86/x86_32/traps.c Wed Mar 05 10:02:11 2008 +0000 @@ -132,7 +132,7 @@ void show_page_walk(unsigned long addr) l3t += (cr3 & 0xFE0UL) >> 3; l3e = l3t[l3_table_offset(addr)]; mfn = l3e_get_pfn(l3e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L3[0x%03lx] = %"PRIpte" %08lx\n", l3_table_offset(addr), l3e_get_intpte(l3e), pfn); unmap_domain_page(l3t); @@ -143,7 +143,7 @@ void show_page_walk(unsigned long addr) l2t = map_domain_page(mfn); l2e = l2t[l2_table_offset(addr)]; mfn = l2e_get_pfn(l2e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L2[0x%03lx] = %"PRIpte" %08lx %s\n", l2_table_offset(addr), l2e_get_intpte(l2e), pfn, (l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : ""); @@ -155,7 +155,7 @@ void show_page_walk(unsigned long addr) l1t = map_domain_page(mfn); l1e = l1t[l1_table_offset(addr)]; mfn = l1e_get_pfn(l1e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L1[0x%03lx] = %"PRIpte" %08lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); unmap_domain_page(l1t); diff -r 4f62147e39e8 -r f22cadec48fe xen/arch/x86/x86_64/traps.c --- a/xen/arch/x86/x86_64/traps.c Mon Mar 03 13:40:08 2008 +0000 +++ b/xen/arch/x86/x86_64/traps.c Wed Mar 05 10:02:11 2008 +0000 @@ -136,7 +136,7 @@ void show_page_walk(unsigned long addr) l4t = mfn_to_virt(mfn); l4e = l4t[l4_table_offset(addr)]; mfn = l4e_get_pfn(l4e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L4[0x%03lx] = %"PRIpte" %016lx\n", l4_table_offset(addr), l4e_get_intpte(l4e), pfn); if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) ) @@ -145,7 +145,7 @@ void show_page_walk(unsigned long addr) l3t = mfn_to_virt(mfn); l3e = l3t[l3_table_offset(addr)]; mfn = l3e_get_pfn(l3e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L3[0x%03lx] = %"PRIpte" %016lx\n", l3_table_offset(addr), l3e_get_intpte(l3e), pfn); if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) ) @@ -154,7 +154,7 @@ void show_page_walk(unsigned long addr) l2t = mfn_to_virt(mfn); l2e = l2t[l2_table_offset(addr)]; mfn = l2e_get_pfn(l2e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L2[0x%03lx] = %"PRIpte" %016lx %s\n", l2_table_offset(addr), l2e_get_intpte(l2e), pfn, (l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : ""); @@ -165,7 +165,7 @@ void show_page_walk(unsigned long addr) l1t = mfn_to_virt(mfn); l1e = l1t[l1_table_offset(addr)]; mfn = l1e_get_pfn(l1e); - pfn = get_gpfn_from_mfn(mfn); + pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L1[0x%03lx] = %"PRIpte" %016lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |