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 2/7] vti fault handler clean up: print VTI_DEBUG

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 2/7] vti fault handler clean up: print VTI_DEBUG info
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 22 Nov 2007 16:07:08 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Wed, 21 Nov 2007 23:07:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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
User-agent: Mutt/1.4.2.1i
# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1195714002 -32400
# Node ID 7d0e55f5a6075bd5af846903e386a6a640f4bf8c
# Parent  a734b0e01f127f6fe8466c49b325e95347219fc1
make register dumper print VTI_DEBUG info.
PATCHNAME: debug_vti_debug_print

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

diff -r a734b0e01f12 -r 7d0e55f5a607 xen/arch/ia64/linux-xen/process-linux-xen.c
--- a/xen/arch/ia64/linux-xen/process-linux-xen.c       Thu Sep 27 11:33:01 
2007 +0900
+++ b/xen/arch/ia64/linux-xen/process-linux-xen.c       Thu Nov 22 15:46:42 
2007 +0900
@@ -116,6 +116,36 @@ EXPORT_SYMBOL(dump_stack);
 EXPORT_SYMBOL(dump_stack);
 
 #ifdef XEN
+#ifdef VTI_DEBUG
+static void
+ivt_debug_print(int i, const struct ivt_debug* ivt_debug)
+{
+       printk("%03d: iip 0x%016lx ipsr 0x%016lx ifa 0x%016lx\n"
+              "     vec %02ld\n",
+              i,
+              ivt_debug->iip,
+              ivt_debug->ipsr,
+              ivt_debug->ifa,
+              ivt_debug->vector);
+}
+
+static void
+vmx_ivt_debug_print(struct vcpu* v)
+{
+       unsigned int i;
+       unsigned int current_idx =
+               v->arch.arch_vmx.ivt_current / sizeof(struct ivt_debug);
+       for (i = current_idx; i < IVT_DEBUG_MAX; i++)
+               ivt_debug_print(i, &v->arch.arch_vmx.ivt_debug[i]);
+       for (i = 0; i < current_idx; i++)
+               ivt_debug_print(i, &v->arch.arch_vmx.ivt_debug[i]);
+}
+#else
+#define vmx_ivt_debug_print(v) do{ } while (0)
+#endif
+#endif
+
+#ifdef XEN
 void
 show_registers(struct pt_regs *regs)
 #else
@@ -137,6 +167,8 @@ show_regs (struct pt_regs *regs)
                printk("d 0x%p domid %d\n", d, d->domain_id);
                printk("vcpu 0x%p vcpu %d\n",
                       vcpu, vcpu->vcpu_id);
+               if (VMX_DOMAIN(vcpu))
+                       vmx_ivt_debug_print(vcpu);
        }
        printk("\nCPU %d\n", smp_processor_id());
        printk("psr : %016lx ifs : %016lx ip  : [<%016lx>]\n",

Attachment: 16419_7d0e55f5a607_debug_vti_debug_print.patch
Description: Text Data

_______________________________________________
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 2/7] vti fault handler clean up: print VTI_DEBUG info, Isaku Yamahata <=