Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
kvm.h File Reference
#include <linux/tracepoint.h>
#include <trace/define_trace.h>

Go to the source code of this file.

Macros

#define _TRACE_KVM_MAIN_H
 
#define TRACE_SYSTEM   kvm
 
#define ERSN(x)   { KVM_EXIT_##x, "KVM_EXIT_" #x }
 
#define kvm_trace_exit_reason
 
#define KVM_TRACE_MMIO_READ_UNSATISFIED   0
 
#define KVM_TRACE_MMIO_READ   1
 
#define KVM_TRACE_MMIO_WRITE   2
 
#define kvm_trace_symbol_mmio
 
#define kvm_fpu_load_symbol
 

Functions

 TRACE_EVENT (kvm_userspace_exit, TP_PROTO(__u32 reason, int errno), TP_ARGS(reason, errno), TP_STRUCT__entry(__field(__u32, reason) __field(int, errno)), TP_fast_assign(__entry->reason=reason;__entry->errno=errno;), TP_printk("reason %s (%d)", __entry->errno< 0?(__entry->errno==-EINTR?"restart":"error"):__print_symbolic(__entry->reason, kvm_trace_exit_reason), __entry->errno< 0?-__entry->errno:__entry->reason))
 
 TRACE_EVENT (kvm_mmio, TP_PROTO(int type, int len, u64 gpa, u64 val), TP_ARGS(type, len, gpa, val), TP_STRUCT__entry(__field(u32, type) __field(u32, len) __field(u64, gpa) __field(u64, val)), TP_fast_assign(__entry->type=type;__entry->len=len;__entry->gpa=gpa;__entry->val=val;), TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", __print_symbolic(__entry->type, kvm_trace_symbol_mmio), __entry->len, __entry->gpa, __entry->val))
 
 TRACE_EVENT (kvm_fpu, TP_PROTO(int load), TP_ARGS(load), TP_STRUCT__entry(__field(u32, load)), TP_fast_assign(__entry->load=load;), TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)))
 
 TRACE_EVENT (kvm_age_page, TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), TP_ARGS(hva, slot, ref), TP_STRUCT__entry(__field(u64, hva) __field(u64, gfn) __field(u8, referenced)), TP_fast_assign(__entry->hva=hva;__entry->gfn=slot->base_gfn+((hva-slot->userspace_addr) >> PAGE_SHIFT);__entry->referenced=ref;), TP_printk("hva %llx gfn %llx %s", __entry->hva, __entry->gfn, __entry->referenced?"YOUNG":"OLD"))
 

Macro Definition Documentation

#define _TRACE_KVM_MAIN_H

Definition at line 2 of file kvm.h.

#define ERSN (   x)    { KVM_EXIT_##x, "KVM_EXIT_" #x }

Definition at line 9 of file kvm.h.

#define kvm_fpu_load_symbol
Value:
{0, "unload"}, \
{1, "load"}

Definition at line 180 of file kvm.h.

#define kvm_trace_exit_reason
Value:
ERSN(UNKNOWN), ERSN(EXCEPTION), ERSN(IO), ERSN(HYPERCALL), \
ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN), \
ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR), \
ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL), \
ERSN(S390_UCONTROL)

Definition at line 11 of file kvm.h.

#define KVM_TRACE_MMIO_READ   1

Definition at line 149 of file kvm.h.

#define KVM_TRACE_MMIO_READ_UNSATISFIED   0

Definition at line 148 of file kvm.h.

#define KVM_TRACE_MMIO_WRITE   2

Definition at line 150 of file kvm.h.

#define kvm_trace_symbol_mmio
Value:
{ KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \
{ KVM_TRACE_MMIO_READ, "read" }, \
{ KVM_TRACE_MMIO_WRITE, "write" }

Definition at line 152 of file kvm.h.

#define TRACE_SYSTEM   kvm

Definition at line 7 of file kvm.h.

Function Documentation

TRACE_EVENT ( kvm_userspace_exit  ,
TP_PROTO(__u32 reason, int errno ,
TP_ARGS(reason, errno ,
TP_STRUCT__entry(__field(__u32, reason) __field(int, errno))  ,
TP_fast_assign(__entry->reason=reason;__entry->errno=errno;)  ,
TP_printk("reason %s (%d)", __entry->errno< 0?(__entry->errno==-EINTR?"restart":"error"):__print_symbolic(__entry->reason, kvm_trace_exit_reason), __entry->errno< 0?-__entry->errno:__entry->reason  
)
TRACE_EVENT ( kvm_mmio  ,
TP_PROTO(int type, int len, u64 gpa, u64 val ,
TP_ARGS(type, len, gpa, val ,
TP_STRUCT__entry(__field(u32, type) __field(u32, len) __field(u64, gpa) __field(u64, val))  ,
TP_fast_assign(__entry->type=type;__entry->len=len;__entry->gpa=gpa;__entry->val=val;)  ,
TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", __print_symbolic(__entry->type, kvm_trace_symbol_mmio), __entry->len, __entry->gpa, __entry->val)   
)
TRACE_EVENT ( kvm_fpu  ,
TP_PROTO(int load ,
TP_ARGS(load ,
TP_STRUCT__entry(__field(u32, load))  ,
TP_fast_assign(__entry->load=load;)  ,
TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol))   
)
TRACE_EVENT ( kvm_age_page  ,
TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref)  ,
TP_ARGS(hva, slot, ref)  ,
TP_STRUCT__entry(__field(u64, hva) __field(u64, gfn) __field(u8, referenced))  ,
TP_fast_assign(__entry->hva=hva;__entry->gfn=slot->base_gfn+((hva-slot->userspace_addr) >> PAGE_SHIFT);__entry->referenced=ref;)  ,
TP_printk("hva %llx gfn %llx %s", __entry->hva, __entry->gfn, __entry->referenced?"YOUNG":"OLD")   
)