]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/kvm_host.h
KVM: Cleanup the kvm_print functions and introduce pr_XX wrappers
[mirror_ubuntu-artful-kernel.git] / include / linux / kvm_host.h
index 19b83f6efa4923bb782a6853c71ca1e095364d14..27ac8a4767fab28e93097d3fe2e5abefc26e0440 100644 (file)
@@ -314,13 +314,19 @@ struct kvm {
        long tlbs_dirty;
 };
 
-/* The guest did something we don't support. */
-#define pr_unimpl(vcpu, fmt, ...)                                      \
-       pr_err_ratelimited("kvm: %i: cpu%i " fmt,                       \
-                          current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__)
+#define kvm_err(fmt, ...) \
+       pr_err("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__)
+#define kvm_info(fmt, ...) \
+       pr_info("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__)
+#define kvm_debug(fmt, ...) \
+       pr_debug("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__)
+#define kvm_pr_unimpl(fmt, ...) \
+       pr_err_ratelimited("kvm [%i]: " fmt, \
+                          task_tgid_nr(current), ## __VA_ARGS__)
 
-#define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt)
-#define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt)
+/* The guest did something we don't support. */
+#define vcpu_unimpl(vcpu, fmt, ...)                                    \
+       kvm_pr_unimpl("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
 
 static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
 {