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>
This commit is contained in:
committed by
Avi Kivity
parent
048354c8e6
commit
d4c9ff2d1b
@ -15,6 +15,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/marker.h>
|
||||
#include <asm/signal.h>
|
||||
|
||||
#include <linux/kvm.h>
|
||||
@ -309,5 +310,18 @@ struct kvm_stats_debugfs_item {
|
||||
struct dentry *dentry;
|
||||
};
|
||||
extern struct kvm_stats_debugfs_item debugfs_entries[];
|
||||
extern struct dentry *debugfs_dir;
|
||||
|
||||
#ifdef CONFIG_KVM_TRACE
|
||||
int kvm_trace_ioctl(unsigned int ioctl, unsigned long arg);
|
||||
void kvm_trace_cleanup(void);
|
||||
#else
|
||||
static inline
|
||||
int kvm_trace_ioctl(unsigned int ioctl, unsigned long arg)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#define kvm_trace_cleanup() ((void)0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user