From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH 20/38] arm: dump a page table walk when va_to_par fails. Date: Fri, 1 Jun 2012 15:39:49 +0000 Message-ID: <1338565207-2888-20-git-send-email-ian.campbell@citrix.com> References: <1338565113.17466.141.camel@zakaz.uk.xensource.com> <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Campbell --- xen/include/asm-arm/page.h | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h index bb1729a..f36bf6f 100644 --- a/xen/include/asm-arm/page.h +++ b/xen/include/asm-arm/page.h @@ -254,6 +254,9 @@ static inline void flush_guest_tlb(void) WRITE_CP32(r0 /* dummy */, TLBIALLNSNH); } +extern void dump_pt_walk(uint32_t addr); +extern void dump_p2m_lookup(struct domain *d, paddr_t addr); + /* Ask the MMU to translate a VA for us */ static inline uint64_t __va_to_par(uint32_t va) { @@ -270,7 +273,11 @@ static inline uint64_t va_to_par(uint32_t va) { uint64_t par = __va_to_par(va); /* It is not OK to call this with an invalid VA */ - if ( par & PAR_F ) panic_PAR(par, "Hypervisor"); + if ( par & PAR_F ) + { + dump_pt_walk(va); + panic_PAR(par, "Hypervisor"); + } return par; } @@ -314,9 +321,6 @@ static inline uint64_t gva_to_ipa(uint32_t va) /* Bits in the PAR returned by va_to_par */ #define PAR_FAULT 0x1 -extern void dump_pt_walk(uint32_t addr); -extern void dump_p2m_lookup(struct domain *d, paddr_t addr); - #endif /* __ASSEMBLY__ */ /* These numbers add up to a 39-bit input address space. The ARMv7-A -- 1.7.9.1