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

[Xen-changelog] Add easy way to turn off all fast paths to rule them out when debugging



# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID a87242c444173c9b5e7d77ab09864395bd9c34cb
# Parent  9870485d4836ae599288e788741426e86916ad00

Add easy way to turn off all fast paths to rule them out when debugging

diff -r 9870485d4836 -r a87242c44417 xen/arch/ia64/hyperprivop.S
--- a/xen/arch/ia64/hyperprivop.S       Tue Jul 12 15:13:06 2005
+++ b/xen/arch/ia64/hyperprivop.S       Wed Jul 13 13:43:49 2005
@@ -14,8 +14,15 @@
 #include <asm/system.h>
 #include <public/arch-ia64.h>
 
+#if 1   // change to 0 to turn off all fast paths
+#define FAST_HYPERPRIVOPS
 #define FAST_HYPERPRIVOP_CNT
 #define FAST_REFLECT_CNT
+#define FAST_TICK
+#define FAST_BREAK
+#define FAST_ACCESS_REFLECT
+#undef RFI_TO_INTERRUPT // not working yet
+#endif
 
 // FIXME: This is defined in include/asm-ia64/hw_irq.h but this
 // doesn't appear to be include'able from assembly?
@@ -45,6 +52,9 @@
 //     r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits)
 //     r31 == pr
 GLOBAL_ENTRY(fast_hyperprivop)
+#ifndef FAST_HYPERPRIVOPS // see beginning of file
+       br.sptk.many dispatch_break_fault ;;
+#endif
        // HYPERPRIVOP_SSM_I?
        // assumes domain interrupts pending, so just do it
        cmp.eq p7,p6=XEN_HYPER_SSM_I,r17
@@ -280,8 +290,7 @@
 //     r30 == cr.ivr
 //     r29 == rp
 GLOBAL_ENTRY(fast_tick_reflect)
-#define FAST_TICK
-#ifndef FAST_TICK
+#ifndef FAST_TICK // see beginning of file
        br.cond.sptk.many rp;;
 #endif
        mov r28=IA64_TIMER_VECTOR;;
@@ -290,7 +299,7 @@
        movl r20=(PERCPU_ADDR)+IA64_CPUINFO_ITM_NEXT_OFFSET;;
        ld8 r26=[r20];;
        mov r27=ar.itc;;
-       adds r27=200,r27        // safety margin
+       adds r27=200,r27;;      // safety margin
        cmp.ltu p6,p0=r26,r27
 (p6)   br.cond.spnt.few rp;;
        mov r17=cr.ipsr;;
@@ -453,8 +462,7 @@
 //     r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits)
 //     r31 == pr
 GLOBAL_ENTRY(fast_break_reflect)
-#define FAST_BREAK
-#ifndef FAST_BREAK
+#ifndef FAST_BREAK // see beginning of file
        br.sptk.many dispatch_break_fault ;;
 #endif
        mov r30=cr.ipsr;;
@@ -595,6 +603,9 @@
 //     r20 == offset into ivt
 //     r31 == pr
 GLOBAL_ENTRY(fast_access_reflect)
+#ifndef FAST_ACCESS_REFLECT // see beginning of file
+       br.spnt.few dispatch_reflection ;;
+#endif
        mov r30=cr.ipsr;;
        mov r29=cr.iip;;
        extr.u r21=r30,IA64_PSR_BE_BIT,1 ;;
@@ -670,7 +681,7 @@
        cmp.ltu p0,p7=r22,r23 ;;        // if !(iip<low) &&
 (p7)   cmp.geu p0,p7=r22,r24 ;;        //    !(iip>=high)
 (p7)   br.spnt.few dispatch_break_fault ;;
-#ifndef RFI_TO_INTERRUPT
+#ifndef RFI_TO_INTERRUPT // see beginning of file
        cmp.ne p6,p0=r30,r0
 (p6)   br.cond.spnt.few dispatch_break_fault ;;
 #endif
diff -r 9870485d4836 -r a87242c44417 xen/arch/ia64/dom_fw.c
--- a/xen/arch/ia64/dom_fw.c    Tue Jul 12 15:13:06 2005
+++ b/xen/arch/ia64/dom_fw.c    Wed Jul 13 13:43:49 2005
@@ -347,9 +347,11 @@
                        unsigned long pm_buffer[16];
                        status = ia64_pal_perf_mon_info(pm_buffer,&r9);
                        if (status != 0) break;
-                       if (copy_to_user((void __user *)in1,pm_buffer,128))
+                       if (copy_to_user((void __user *)in1,pm_buffer,128)) {
                                printk("xen_pal_emulator: PAL_PERF_MON_INFO "
                                        "can't copy to user!!!!\n");
+                               status = -1;
+                       }
                }
                break;
            case PAL_CACHE_INFO:

_______________________________________________
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®.