diff options
Diffstat (limited to 'arch/ia64/kvm/vmm.c')
-rw-r--r-- | arch/ia64/kvm/vmm.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/ia64/kvm/vmm.c b/arch/ia64/kvm/vmm.c index 2275bf4e681a..9eee5c04bacc 100644 --- a/arch/ia64/kvm/vmm.c +++ b/arch/ia64/kvm/vmm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | ||
23 | #include<linux/kernel.h> | ||
23 | #include<linux/module.h> | 24 | #include<linux/module.h> |
24 | #include<asm/fpswa.h> | 25 | #include<asm/fpswa.h> |
25 | 26 | ||
@@ -31,6 +32,8 @@ MODULE_LICENSE("GPL"); | |||
31 | extern char kvm_ia64_ivt; | 32 | extern char kvm_ia64_ivt; |
32 | extern fpswa_interface_t *vmm_fpswa_interface; | 33 | extern fpswa_interface_t *vmm_fpswa_interface; |
33 | 34 | ||
35 | long vmm_sanity = 1; | ||
36 | |||
34 | struct kvm_vmm_info vmm_info = { | 37 | struct kvm_vmm_info vmm_info = { |
35 | .module = THIS_MODULE, | 38 | .module = THIS_MODULE, |
36 | .vmm_entry = vmm_entry, | 39 | .vmm_entry = vmm_entry, |
@@ -62,5 +65,31 @@ void vmm_spin_unlock(spinlock_t *lock) | |||
62 | { | 65 | { |
63 | _vmm_raw_spin_unlock(lock); | 66 | _vmm_raw_spin_unlock(lock); |
64 | } | 67 | } |
68 | |||
69 | static void vcpu_debug_exit(struct kvm_vcpu *vcpu) | ||
70 | { | ||
71 | struct exit_ctl_data *p = &vcpu->arch.exit_data; | ||
72 | long psr; | ||
73 | |||
74 | local_irq_save(psr); | ||
75 | p->exit_reason = EXIT_REASON_DEBUG; | ||
76 | vmm_transition(vcpu); | ||
77 | local_irq_restore(psr); | ||
78 | } | ||
79 | |||
80 | asmlinkage int printk(const char *fmt, ...) | ||
81 | { | ||
82 | struct kvm_vcpu *vcpu = current_vcpu; | ||
83 | va_list args; | ||
84 | int r; | ||
85 | |||
86 | memset(vcpu->arch.log_buf, 0, VMM_LOG_LEN); | ||
87 | va_start(args, fmt); | ||
88 | r = vsnprintf(vcpu->arch.log_buf, VMM_LOG_LEN, fmt, args); | ||
89 | va_end(args); | ||
90 | vcpu_debug_exit(vcpu); | ||
91 | return r; | ||
92 | } | ||
93 | |||
65 | module_init(kvm_vmm_init) | 94 | module_init(kvm_vmm_init) |
66 | module_exit(kvm_vmm_exit) | 95 | module_exit(kvm_vmm_exit) |