[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] IA64: fix panic caused by daccess fault.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1229045783 -32400
# Node ID 09c467481a44ad6c95c0b34faf6db4d986b5fc28
# Parent  05b293d7fbb7ef4505793410f370b951a6d8804c
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>
---
 xen/arch/ia64/xen/faults.c |    7 +++++++
 xen/arch/ia64/xen/ivt.S    |    9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff -r 05b293d7fbb7 -r 09c467481a44 xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Fri Dec 12 10:35:58 2008 +0900
+++ b/xen/arch/ia64/xen/faults.c        Fri Dec 12 10:36:23 2008 +0900
@@ -412,6 +412,13 @@ ia64_fault(unsigned long vector, unsigne
                printk("Dirty-bit.\n");
                break;
 
+       case 10:
+               /* __domain_get_bundle() may cause fault. */
+               if (ia64_done_with_exception(regs))
+                       return;
+               printk("Data Access-bit.\n");
+               break;
+
        case 20:
                printk("Page Not Found.\n");
                break;
diff -r 05b293d7fbb7 -r 09c467481a44 xen/arch/ia64/xen/ivt.S
--- a/xen/arch/ia64/xen/ivt.S   Fri Dec 12 10:35:58 2008 +0900
+++ b/xen/arch/ia64/xen/ivt.S   Fri Dec 12 10:36:23 2008 +0900
@@ -471,10 +471,17 @@ 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
-       br.sptk.many fast_access_reflect
+       extr.u r18=r18,IA64_PSR_CPL0_BIT,2
+       ;;
+       cmp.ne p6,p0=r0,r18     /* cpl != 0? */
+(p6)   br.sptk.many fast_access_reflect
+       /* __domain_get_bundle() may cause this fault. */
+       br.sptk.few dispatch_to_fault_handler
        ;;
 END(daccess_bit)
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.