ia64/xen-unstable
changeset 15106:c027880b50b4
x86/hvm: add logging for hypercalls
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | kfraser@localhost.localdomain |
---|---|
date | Tue May 15 10:43:59 2007 +0100 (2007-05-15) |
parents | 9e9c09c75110 |
children | dc4324d3fbb0 |
files | xen/arch/x86/hvm/hvm.c xen/include/asm-x86/hvm/support.h |
line diff
1.1 --- a/xen/arch/x86/hvm/hvm.c Tue May 15 10:43:18 2007 +0100 1.2 +++ b/xen/arch/x86/hvm/hvm.c Tue May 15 10:43:59 2007 +0100 1.3 @@ -776,6 +776,9 @@ int hvm_do_hypercall(struct cpu_user_reg 1.4 #ifdef __x86_64__ 1.5 if ( mode == 8 ) 1.6 { 1.7 + HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%lx, %lx, %lx, %lx, %lx)", eax, 1.8 + regs->rdi, regs->rsi, regs->rdx, regs->r10, regs->r8); 1.9 + 1.10 regs->rax = hvm_hypercall64_table[eax](regs->rdi, 1.11 regs->rsi, 1.12 regs->rdx, 1.13 @@ -785,6 +788,11 @@ int hvm_do_hypercall(struct cpu_user_reg 1.14 else 1.15 #endif 1.16 { 1.17 + HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x)", eax, 1.18 + (uint32_t)regs->ebx, (uint32_t)regs->ecx, 1.19 + (uint32_t)regs->edx, (uint32_t)regs->esi, 1.20 + (uint32_t)regs->edi); 1.21 + 1.22 regs->eax = hvm_hypercall32_table[eax]((uint32_t)regs->ebx, 1.23 (uint32_t)regs->ecx, 1.24 (uint32_t)regs->edx, 1.25 @@ -792,6 +800,8 @@ int hvm_do_hypercall(struct cpu_user_reg 1.26 (uint32_t)regs->edi); 1.27 } 1.28 1.29 + HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u -> %lx", eax, (unsigned long)regs->eax); 1.30 + 1.31 return (this_cpu(hc_preempted) ? HVM_HCALL_preempted : 1.32 flush ? HVM_HCALL_invalidate : HVM_HCALL_completed); 1.33 } 1.34 @@ -1054,6 +1064,10 @@ long do_hvm_op(unsigned long op, XEN_GUE 1.35 rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0; 1.36 } 1.37 1.38 + HVM_DBG_LOG(DBG_LEVEL_HCALL, "%s param %u = %"PRIx64, 1.39 + op == HVMOP_set_param ? "set" : "get", 1.40 + a.index, a.value); 1.41 + 1.42 param_fail: 1.43 rcu_unlock_domain(d); 1.44 break;
2.1 --- a/xen/include/asm-x86/hvm/support.h Tue May 15 10:43:18 2007 +0100 2.2 +++ b/xen/include/asm-x86/hvm/support.h Tue May 15 10:43:59 2007 +0100 2.3 @@ -62,6 +62,7 @@ static inline vcpu_iodata_t *get_ioreq(s 2.4 #define DBG_LEVEL_VLAPIC_TIMER (1 << 7) 2.5 #define DBG_LEVEL_VLAPIC_INTERRUPT (1 << 8) 2.6 #define DBG_LEVEL_IOAPIC (1 << 9) 2.7 +#define DBG_LEVEL_HCALL (1 << 10) 2.8 2.9 extern unsigned int opt_hvm_debug_level; 2.10 #define HVM_DBG_LOG(level, _f, _a...) \