aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorKazuya Saito <saito.kazuya@jp.fujitsu.com>2013-03-29 13:27:05 +0900
committerStefan Hajnoczi <stefanha@redhat.com>2013-05-03 13:58:08 +0200
commit9c7757290c6d80c2f5bde6fa71d2c9fe2b331c8c (patch)
tree62e1498fdfd2aee7707c5cfb546e234dda87a187 /kvm-all.c
parent8ca27ce2e1150486ea2db4116a03706b28294f16 (diff)
kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints
This patch adds tracepoints at ioctl to kvm. Tracing these ioctl is useful for clarification whether the cause of troubles is qemu or kvm. Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index f6c0f4a087..4f73b98f33 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -33,6 +33,7 @@
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "qemu/event_notifier.h"
+#include "trace.h"
/* This check must be after config-host.h is included */
#ifdef CONFIG_EVENTFD
@@ -1687,6 +1688,7 @@ int kvm_ioctl(KVMState *s, int type, ...)
arg = va_arg(ap, void *);
va_end(ap);
+ trace_kvm_ioctl(type, arg);
ret = ioctl(s->fd, type, arg);
if (ret == -1) {
ret = -errno;
@@ -1704,6 +1706,7 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
arg = va_arg(ap, void *);
va_end(ap);
+ trace_kvm_vm_ioctl(type, arg);
ret = ioctl(s->vmfd, type, arg);
if (ret == -1) {
ret = -errno;
@@ -1721,6 +1724,7 @@ int kvm_vcpu_ioctl(CPUState *cpu, int type, ...)
arg = va_arg(ap, void *);
va_end(ap);
+ trace_kvm_vcpu_ioctl(cpu->cpu_index, type, arg);
ret = ioctl(cpu->kvm_fd, type, arg);
if (ret == -1) {
ret = -errno;