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

[Xen-changelog] [xen-unstable] x86/hvm: add logging for hypercalls



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1179222239 -3600
# Node ID c027880b50b44f4fa256cdf8888b435e5323fc4c
# Parent  9e9c09c75110a0a75dbf6ac8a23be4ddc87f54ed
x86/hvm: add logging for hypercalls
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c            |   14 ++++++++++++++
 xen/include/asm-x86/hvm/support.h |    1 +
 2 files changed, 15 insertions(+)

diff -r 9e9c09c75110 -r c027880b50b4 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Tue May 15 10:43:18 2007 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Tue May 15 10:43:59 2007 +0100
@@ -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,12 +788,19 @@ 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,
                                                (uint32_t)regs->esi,
                                                (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);
@@ -1054,6 +1064,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;
diff -r 9e9c09c75110 -r c027880b50b4 xen/include/asm-x86/hvm/support.h
--- a/xen/include/asm-x86/hvm/support.h Tue May 15 10:43:18 2007 +0100
+++ b/xen/include/asm-x86/hvm/support.h Tue May 15 10:43:59 2007 +0100
@@ -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-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®.