diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-07-20 10:10:15 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-07-20 10:10:15 +0100 |
commit | e60c0b8f66ea97bb59e53bd3aca8fd741a430a11 (patch) | |
tree | 4a142fc57ffcf5647bb92e707eefa8860961cf58 /xen/arch/x86/x86_64/traps.c | |
parent | bd9dfffdcb72739db811140c3056d409c1a955d9 (diff) | |
download | xen-e60c0b8f66ea97bb59e53bd3aca8fd741a430a11.tar.gz xen-e60c0b8f66ea97bb59e53bd3aca8fd741a430a11.tar.bz2 xen-e60c0b8f66ea97bb59e53bd3aca8fd741a430a11.zip |
x86: make show_page_walk() more robust
Also add in a missing line in x86-64's do_page_walk().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/x86_64/traps.c')
-rw-r--r-- | xen/arch/x86/x86_64/traps.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index f458f491c7..4c74785c74 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -179,7 +179,8 @@ void show_page_walk(unsigned long addr) 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) ) + if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) || + !mfn_valid(mfn) ) return; l3t = mfn_to_virt(mfn); @@ -190,7 +191,8 @@ void show_page_walk(unsigned long addr) l3_table_offset(addr), l3e_get_intpte(l3e), pfn, (l3e_get_flags(l3e) & _PAGE_PSE) ? " (PSE)" : ""); if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || - (l3e_get_flags(l3e) & _PAGE_PSE) ) + (l3e_get_flags(l3e) & _PAGE_PSE) || + !mfn_valid(mfn) ) return; l2t = mfn_to_virt(mfn); @@ -201,7 +203,8 @@ void show_page_walk(unsigned long addr) l2_table_offset(addr), l2e_get_intpte(l2e), pfn, (l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : ""); if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) || - (l2e_get_flags(l2e) & _PAGE_PSE) ) + (l2e_get_flags(l2e) & _PAGE_PSE) || + !mfn_valid(mfn) ) return; l1t = mfn_to_virt(mfn); |