aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/vmm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kvm/vmm.c')
-rw-r--r--arch/ia64/kvm/vmm.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/ia64/kvm/vmm.c b/arch/ia64/kvm/vmm.c
index 2275bf4e681a..957779593c2f 100644
--- a/arch/ia64/kvm/vmm.c
+++ b/arch/ia64/kvm/vmm.c
@@ -62,5 +62,31 @@ void vmm_spin_unlock(spinlock_t *lock)
62{ 62{
63 _vmm_raw_spin_unlock(lock); 63 _vmm_raw_spin_unlock(lock);
64} 64}
65
66static void vcpu_debug_exit(struct kvm_vcpu *vcpu)
67{
68 struct exit_ctl_data *p = &vcpu->arch.exit_data;
69 long psr;
70
71 local_irq_save(psr);
72 p->exit_reason = EXIT_REASON_DEBUG;
73 vmm_transition(vcpu);
74 local_irq_restore(psr);
75}
76
77asmlinkage int printk(const char *fmt, ...)
78{
79 struct kvm_vcpu *vcpu = current_vcpu;
80 va_list args;
81 int r;
82
83 memset(vcpu->arch.log_buf, 0, VMM_LOG_LEN);
84 va_start(args, fmt);
85 r = vsnprintf(vcpu->arch.log_buf, VMM_LOG_LEN, fmt, args);
86 va_end(args);
87 vcpu_debug_exit(vcpu);
88 return r;
89}
90
65module_init(kvm_vmm_init) 91module_init(kvm_vmm_init)
66module_exit(kvm_vmm_exit) 92module_exit(kvm_vmm_exit)