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

[Xen-devel] [PATCH] x86/hvm: add logging for hypercalls

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86/hvm: add logging for hypercalls
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 14 May 2007 17:37:16 +0200
Delivery-date: Mon, 14 May 2007 08:34:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-05-14/xen/arch/x86/hvm/hvm.c
===================================================================
--- 2007-05-14.orig/xen/arch/x86/hvm/hvm.c      2007-05-14 14:21:26.000000000 
+0200
+++ 2007-05-14/xen/arch/x86/hvm/hvm.c   2007-05-14 14:32:48.000000000 +0200
@@ -776,6 +776,9 @@ int hvm_do_hypercall(struct cpu_user_reg
 #ifdef __x86_64__
     if ( mode == 8 )
     {
+        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%lx, %lx, %lx, %lx, %lx)", eax,
+                    regs->rdi, regs->rsi, regs->rdx, regs->r10, regs->r8);
+
         regs->rax = hvm_hypercall64_table[eax](regs->rdi,
                                                regs->rsi,
                                                regs->rdx,
@@ -785,6 +788,11 @@ int hvm_do_hypercall(struct cpu_user_reg
     else
 #endif
     {
+        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x)", eax,
+                    (uint32_t)regs->ebx, (uint32_t)regs->ecx,
+                    (uint32_t)regs->edx, (uint32_t)regs->esi,
+                    (uint32_t)regs->edi);
+
         regs->eax = hvm_hypercall32_table[eax]((uint32_t)regs->ebx,
                                                (uint32_t)regs->ecx,
                                                (uint32_t)regs->edx,
@@ -792,6 +800,8 @@ int hvm_do_hypercall(struct cpu_user_reg
                                                (uint32_t)regs->edi);
     }
 
+    HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u -> %lx", eax, (unsigned 
long)regs->eax);
+
     return (this_cpu(hc_preempted) ? HVM_HCALL_preempted :
             flush ? HVM_HCALL_invalidate : HVM_HCALL_completed);
 }
@@ -1056,6 +1066,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
             rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
+        HVM_DBG_LOG(DBG_LEVEL_HCALL, "%s param %u = %"PRIx64,
+                    op == HVMOP_set_param ? "set" : "get",
+                    a.index, a.value);
+
     param_fail:
         rcu_unlock_domain(d);
         break;
Index: 2007-05-14/xen/include/asm-x86/hvm/support.h
===================================================================
--- 2007-05-14.orig/xen/include/asm-x86/hvm/support.h   2007-04-23 
10:01:46.000000000 +0200
+++ 2007-05-14/xen/include/asm-x86/hvm/support.h        2007-05-14 
14:31:44.000000000 +0200
@@ -62,6 +62,7 @@ static inline vcpu_iodata_t *get_ioreq(s
 #define DBG_LEVEL_VLAPIC_TIMER      (1 << 7)
 #define DBG_LEVEL_VLAPIC_INTERRUPT  (1 << 8)
 #define DBG_LEVEL_IOAPIC            (1 << 9)
+#define DBG_LEVEL_HCALL             (1 << 10)
 
 extern unsigned int opt_hvm_debug_level;
 #define HVM_DBG_LOG(level, _f, _a...)                                         \




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86/hvm: add logging for hypercalls, Jan Beulich <=