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-changelog

[Xen-changelog] [xen-unstable] [IA64] Enable PV domain debugging.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Enable PV domain debugging.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 02:48:32 -0700
Delivery-date: Fri, 27 Jul 2007 02:46:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1182534284 21600
# Node ID 4d159746d0e6e2bf12c90c9e444104327d195dad
# Parent  6b1b119191f1c27daec93a11a9a387b85149c021
[IA64] Enable PV domain debugging.

Signed-off-by: Tristan Gingold <tgingold@xxxxxxx>
---
 xen/arch/ia64/xen/faults.c                  |   17 ++++++----
 xen/include/asm-ia64/debugger.h             |   45 ++++++++--------------------
 xen/include/asm-ia64/linux-xen/asm/ptrace.h |    1 
 3 files changed, 26 insertions(+), 37 deletions(-)

diff -r 6b1b119191f1 -r 4d159746d0e6 xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Thu Jun 21 16:50:55 2007 -0600
+++ b/xen/arch/ia64/xen/faults.c        Fri Jun 22 11:44:44 2007 -0600
@@ -647,6 +647,11 @@ ia64_handle_reflection(unsigned long ifa
                PSCB(current, iim) = iim;
                vector = IA64_SPECULATION_VECTOR;
                break;
+       case 29:
+               vector = IA64_DEBUG_VECTOR;
+               if (debugger_trap_entry(vector,regs))
+                       return;
+               break;
        case 30:
                // FIXME: Should we handle unaligned refs in Xen??
                vector = IA64_UNALIGNED_REF_VECTOR;
@@ -681,19 +686,19 @@ ia64_handle_reflection(unsigned long ifa
                vector = IA64_LOWERPRIV_TRANSFER_TRAP_VECTOR;
                break;
        case 35:
-               printk("ia64_handle_reflection: handling taken branch trap\n");
                vector = IA64_TAKEN_BRANCH_TRAP_VECTOR;
+               if (debugger_trap_entry(vector,regs))
+                       return;
                break;
        case 36:
-               printk("ia64_handle_reflection: handling single step trap\n");
                vector = IA64_SINGLE_STEP_TRAP_VECTOR;
+               if (debugger_trap_entry(vector,regs))
+                       return;
                break;
 
        default:
-               printk("ia64_handle_reflection: unhandled vector=0x%lx\n",
-                      vector);
-               while (vector)
-                       /* spin */;
+               panic_domain(regs, "ia64_handle_reflection: "
+                            "unhandled vector=0x%lx\n", vector);
                return;
        }
        if (check_lazy_cover && (isr & IA64_ISR_IR) &&
diff -r 6b1b119191f1 -r 4d159746d0e6 xen/include/asm-ia64/debugger.h
--- a/xen/include/asm-ia64/debugger.h   Thu Jun 21 16:50:55 2007 -0600
+++ b/xen/include/asm-ia64/debugger.h   Fri Jun 22 11:44:44 2007 -0600
@@ -56,13 +56,6 @@ show_execution_state(struct cpu_user_reg
 #ifdef CRASH_DEBUG
 // crash_debug=y
 
-/* The main trap handlers use these helper macros which include early bail. */
-static inline int debugger_trap_entry(
-    unsigned int vector, struct cpu_user_regs *regs)
-{
-    return 0;
-}
-
 extern int __trap_to_cdb(struct cpu_user_regs *r);
 static inline int debugger_trap_fatal(
     unsigned int vector, struct cpu_user_regs *regs)
@@ -80,31 +73,7 @@ static inline int debugger_trap_fatal(
 #define smp_send_stop()        /* nothing */
 #endif
 
-#elif defined DOMU_DEBUG
-// domu_debug=y
-#warning "domu_debug is not implemented yet."
-/* The main trap handlers use these helper macros which include early bail. */
-static inline int debugger_trap_entry(
-    unsigned int vector, struct cpu_user_regs *regs)
-{
-    return 0;
-}
-
-static inline int debugger_trap_fatal(
-    unsigned int vector, struct cpu_user_regs *regs)
-{
-    return 0;
-}
-
-#define debugger_trap_immediate()              ((void)0)
 #else
-/* The main trap handlers use these helper macros which include early bail. */
-static inline int debugger_trap_entry(
-    unsigned int vector, struct cpu_user_regs *regs)
-{
-    return 0;
-}
-
 static inline int debugger_trap_fatal(
     unsigned int vector, struct cpu_user_regs *regs)
 {
@@ -113,6 +82,20 @@ static inline int debugger_trap_fatal(
 
 #define debugger_trap_immediate()              ((void)0)
 #endif
+
+static inline int debugger_trap_entry(
+    unsigned int vector, struct cpu_user_regs *regs)
+{
+    struct vcpu *v = current;
+
+    if (guest_kernel_mode(regs) && v->domain->debugger_attached) {
+        domain_pause_for_debugger();
+        return 1;
+    }
+
+    return 0;
+}
+
 #endif // __ASSEMBLLY__
 
 #endif /* __ASM_DEBUGGER_H__ */
diff -r 6b1b119191f1 -r 4d159746d0e6 xen/include/asm-ia64/linux-xen/asm/ptrace.h
--- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h       Thu Jun 21 16:50:55 
2007 -0600
+++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h       Fri Jun 22 11:44:44 
2007 -0600
@@ -267,6 +267,7 @@ struct switch_stack {
 # define ia64_psr(regs)                        ((struct ia64_psr *) 
&(regs)->cr_ipsr)
 #ifdef XEN
 # define guest_mode(regs)              (ia64_psr(regs)->cpl != 0)
+# define guest_kernel_mode(regs)       (ia64_psr(regs)->cpl == 2)
 #else
 # define user_mode(regs)               (((struct ia64_psr *) 
&(regs)->cr_ipsr)->cpl != 0)
 #endif

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Enable PV domain debugging., Xen patchbot-unstable <=