kvm: introduce vcpu_debug = kvm_debug + vcpu context
authorAndrey Smetanin <asmetanin@virtuozzo.com>
Fri, 3 Jul 2015 12:01:35 +0000 (15:01 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jul 2015 06:27:06 +0000 (08:27 +0200)
vcpu_debug is useful macro like kvm_debug but additionally
includes vcpu context inside output.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Peter Hornyack <peterhornyack@google.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Gleb Natapov <gleb@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/kvm_host.h

index 05e99b8ef465bcc10ca979b26b68277191951d86..1d917d9b7f12c765b2ab73a47123470693be2f74 100644 (file)
@@ -424,6 +424,9 @@ struct kvm {
 #define vcpu_unimpl(vcpu, fmt, ...)                                    \
        kvm_pr_unimpl("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
 
+#define vcpu_debug(vcpu, fmt, ...)                                     \
+       kvm_debug("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
+
 static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
 {
        smp_rmb();