WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] fix panic caused by daccess fault.

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] fix panic caused by daccess fault.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 12:35:55 +0900
Delivery-date: Wed, 10 Dec 2008 19:35:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
I hit the panic while fpswa testing.

IA64: fix panic caused by daccess fault.

While fpswa emulation, Xen VMM access guest virtual address space
which may cause daccess fault resulting in panic.
This patch make daccess fault handler handle such cases properly.

(XEN) Xen BUG at faults.c:583
(XEN) FIXME: implement ia64 dump_execution_state()
(XEN) 
(XEN) Call Trace:
(XEN)  [<f4000000040fe360>] show_stack+0x90/0xb0
(XEN)                                 sp=f0000002b6067940 bsp=f0000002b6061860
(XEN)  [<f4000000040fee70>] dump_stack+0x30/0x50
(XEN)                                 sp=f0000002b6067b10 bsp=f0000002b6061840
(XEN)  [<f4000000040640d0>] __bug+0x70/0xa0
(XEN)                                 sp=f0000002b6067b10 bsp=f0000002b6061810
(XEN)  [<f4000000040b53b0>] ia64_handle_reflection+0x60/0x13b0
(XEN)                                 sp=f0000002b6067b10 bsp=f0000002b60617b8
(XEN)  [<f4000000040f5b40>] ia64_leave_kernel+0x0/0x300
(XEN)                                 sp=f0000002b6067b20 bsp=f0000002b60617b8
(XEN)  [<f4000000040c3a20>] __get_domain_bundle+0x0/0x40
(XEN)                                 sp=f0000002b6067d20 bsp=f0000002b6061778
(XEN)  [<f4000000040bee20>] vcpu_get_domain_bundle+0xb0/0xa10
(XEN)                                 sp=f0000002b6067d20 bsp=f0000002b60616e8
(XEN)  [<f4000000040b3f20>] handle_fpu_swa+0x360/0x4a0
(XEN)                                 sp=f0000002b6067d60 bsp=f0000002b6061660
(XEN) vcpu.c:1371: vcpu_get_domain_bundle gip 0x40000000000008a0
(XEN)  [<f4000000040b5e90>] ia64_handle_reflection+0xb40/0x13b0
(XEN)                                 sp=f0000002b6067df0 bsp=f0000002b6061610
(XEN) vcpu.c:1371: vcpu_get_domain_bundle gip 0x4000000000000730
(XEN) faults.c:343:d6 handle_fpu_swa(fault): floating-point bundle at 
0x4000000000000730 not mapped
(XEN)  [<f4000000040f5b40>] ia64_leave_kernel+0x0/0x300
(XEN)                                 sp=f0000002b6067e00 bsp=f0000002b6061610
(XEN) vcpu.c:1371: vcpu_get_domain_bundle gip 0x40000000000008a0
(XEN) faults.c:343:d6 handle_fpu_swa(fault): floating-point bundle at 
0x40000000000008a0 not mapped
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 15:
(XEN) Xen BUG at faults.c:583
(XEN) ****************************************

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/xen/arch/ia64/xen/ivt.S b/xen/arch/ia64/xen/ivt.S
--- a/xen/arch/ia64/xen/ivt.S
+++ b/xen/arch/ia64/xen/ivt.S
@@ -471,9 +471,15 @@ ENTRY(daccess_bit)
        DBG_FAULT(10)
        mov r16=cr.isr
        mov r17=cr.ifa
+       mov r18=cr.ipsr
        mov r31=pr
        mov r19=10
+       ;;
        mov r20=0x2800
+       extr.u r18=r18,IA64_PSR_CPL0_BIT,2
+       ;;
+       cmp.eq p6,p0=r0,r18     /* cpl == 0? */
+(p6)   br.sptk.few page_fault  /* __domain_get_bundle() may cause fault. */
        br.sptk.many fast_access_reflect
        ;;
 END(daccess_bit)


-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] fix panic caused by daccess fault., Isaku Yamahata <=