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

RE: [Xen-ia64-devel] [PATCH] [5/6] panic stack trace: adds hook

To: "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] [PATCH] [5/6] panic stack trace: adds hook
From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Wed, 28 Dec 2005 15:31:47 -0800
Delivery-date: Wed, 28 Dec 2005 23:35:39 +0000
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/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYLly54fEkWPSzwRqCokIdgzIl4SAAb24Bw
Thread-topic: [Xen-ia64-devel] [PATCH] [5/6] panic stack trace: adds hook
Is the code for break 0x0 just for testing the register
dump code?  Isn't it possible for a guest to generate a
break 0x0 that should be reflected?  (And, IIRC, I think
on certain break instructions, the immediate value is
ignored and a zero is used instead...)

> -----Original Message-----
> From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf 
> Of Isaku Yamahata
> Sent: Wednesday, December 28, 2005 3:12 AM
> To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-ia64-devel] [PATCH] [5/6] panic stack trace: adds hook
> 
> 5/6
> insert hook to handle 'break 0x0'.
> 
> 
> Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
> 
> --
> diff -r fc7f2f8057cb -r 8a92e8091a2f xen/arch/ia64/xen/hyperprivop.S
> --- a/xen/arch/ia64/xen/hyperprivop.S Wed Dec 28 15:20:00 2005 +0900
> +++ b/xen/arch/ia64/xen/hyperprivop.S Wed Dec 28 15:29:23 2005 +0900
> @@ -543,6 +543,13 @@
>       extr.u r21=r30,IA64_PSR_PP_BIT,1 ;;
>       cmp.ne p7,p0=r21,r0 ;;
>  (p7) br.spnt.few dispatch_break_fault ;;
> +        movl r20=IA64_PSR_CPL ;; 
> +        and r22=r20,r30 ;;
> +        cmp.ne p7,p0=r22,r0
> +(p7)    br.spnt.many 1f ;;
> +        cmp.eq p7,p0=r17,r0
> +(p7)    br.spnt.few dispatch_break_fault ;;
> +1:
>  #if 1 /* special handling in case running on simulator */
>       movl r20=first_break;;
>       ld4 r23=[r20];;
> diff -r fc7f2f8057cb -r 8a92e8091a2f xen/arch/ia64/xen/ivt.S
> --- a/xen/arch/ia64/xen/ivt.S Wed Dec 28 15:20:00 2005 +0900
> +++ b/xen/arch/ia64/xen/ivt.S Wed Dec 28 15:29:23 2005 +0900
> @@ -839,6 +839,8 @@
>       mov r17=cr.iim
>       mov r31=pr
>       ;;
> +     cmp.eq p7,p0=r17,r0
> +(p7) br.spnt.few dispatch_break_fault ;;
>       movl r18=XSI_PSR_IC
>       ;;
>       ld8 r19=[r18]
> diff -r fc7f2f8057cb -r 8a92e8091a2f xen/arch/ia64/xen/process.c
> --- a/xen/arch/ia64/xen/process.c     Wed Dec 28 15:20:00 2005 +0900
> +++ b/xen/arch/ia64/xen/process.c     Wed Dec 28 15:29:23 2005 +0900
> @@ -33,6 +33,7 @@
>  #include <xen/multicall.h>
>  
>  extern unsigned long vcpu_get_itir_on_fault(struct vcpu *, UINT64);
> +extern void die_if_kernel(char *str, struct pt_regs *regs, long err);
>  
>  extern unsigned long dom0_start, dom0_size;
>  
> @@ -686,6 +687,8 @@
>                       vcpu_increment_iip(current);
>       }
>       else {
> +             if (iim == 0) 
> +                     die_if_kernel("bug check", regs, iim);
>               PSCB(v,iim) = iim;
>               reflect_interruption(isr,regs,IA64_BREAK_VECTOR);
>       }
> diff -r fc7f2f8057cb -r 8a92e8091a2f xen/arch/ia64/xen/xenmisc.c
> --- a/xen/arch/ia64/xen/xenmisc.c     Wed Dec 28 15:20:00 2005 +0900
> +++ b/xen/arch/ia64/xen/xenmisc.c     Wed Dec 28 15:29:23 2005 +0900
> @@ -230,7 +230,13 @@
>  
>  void die_if_kernel(char *str, struct pt_regs *regs, long 
> err) /* __attribute__ ((noreturn)) */
>  {
> -     printk("die_if_kernel: called, not implemented\n");
> +     if (user_mode(regs))
> +             return;
> +
> +     printk("%s: %s %ld\n", __func__, str, err);
> +     debugtrace_dump();
> +     show_registers(regs);
> +     domain_crash_synchronous();
>  }
>  
>  long
> 
> 
> -- 
> yamahata
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel
> 

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

<Prev in Thread] Current Thread [Next in Thread>