diff options
author | Feng(Eric) Liu <eric.e.liu@intel.com> | 2008-04-10 08:47:53 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 12:01:22 +0300 |
commit | d4c9ff2d1b78e385471b3f4d80c0596909926ef7 (patch) | |
tree | 5551c0f6c56439df39ca434115840f4e36cee2ea /virt/kvm/kvm_main.c | |
parent | 048354c8e6bf95e7347f623d8a0da5b89e216405 (diff) | |
download | lwn-d4c9ff2d1b78e385471b3f4d80c0596909926ef7.tar.gz lwn-d4c9ff2d1b78e385471b3f4d80c0596909926ef7.zip |
KVM: Add kvm trace userspace interface
This interface allows user a space application to read the trace of kvm
related events through relayfs.
Signed-off-by: Feng (Eric) Liu <eric.e.liu@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 6a52c084e068..d5911d9895c3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -60,7 +60,7 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_cache); static __read_mostly struct preempt_ops kvm_preempt_ops; -static struct dentry *debugfs_dir; +struct dentry *debugfs_dir; static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl, unsigned long arg); @@ -1191,6 +1191,11 @@ static long kvm_dev_ioctl(struct file *filp, r += PAGE_SIZE; /* pio data page */ #endif break; + case KVM_TRACE_ENABLE: + case KVM_TRACE_PAUSE: + case KVM_TRACE_DISABLE: + r = kvm_trace_ioctl(ioctl, arg); + break; default: return kvm_arch_dev_ioctl(filp, ioctl, arg); } @@ -1519,6 +1524,7 @@ EXPORT_SYMBOL_GPL(kvm_init); void kvm_exit(void) { + kvm_trace_cleanup(); misc_deregister(&kvm_dev); kmem_cache_destroy(kvm_vcpu_cache); sysdev_unregister(&kvm_sysdev); |