linux/arch/arm/kvm/trace.h
<<
>>
Prefs
   1#if !defined(_TRACE_ARM_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
   2#define _TRACE_ARM_KVM_H
   3
   4#include <linux/tracepoint.h>
   5
   6#undef TRACE_SYSTEM
   7#define TRACE_SYSTEM kvm
   8
   9/* Architecturally implementation defined CP15 register access */
  10TRACE_EVENT(kvm_emulate_cp15_imp,
  11        TP_PROTO(unsigned long Op1, unsigned long Rt1, unsigned long CRn,
  12                 unsigned long CRm, unsigned long Op2, bool is_write),
  13        TP_ARGS(Op1, Rt1, CRn, CRm, Op2, is_write),
  14
  15        TP_STRUCT__entry(
  16                __field(        unsigned int,   Op1             )
  17                __field(        unsigned int,   Rt1             )
  18                __field(        unsigned int,   CRn             )
  19                __field(        unsigned int,   CRm             )
  20                __field(        unsigned int,   Op2             )
  21                __field(        bool,           is_write        )
  22        ),
  23
  24        TP_fast_assign(
  25                __entry->is_write               = is_write;
  26                __entry->Op1                    = Op1;
  27                __entry->Rt1                    = Rt1;
  28                __entry->CRn                    = CRn;
  29                __entry->CRm                    = CRm;
  30                __entry->Op2                    = Op2;
  31        ),
  32
  33        TP_printk("Implementation defined CP15: %s\tp15, %u, r%u, c%u, c%u, %u",
  34                        (__entry->is_write) ? "mcr" : "mrc",
  35                        __entry->Op1, __entry->Rt1, __entry->CRn,
  36                        __entry->CRm, __entry->Op2)
  37);
  38
  39TRACE_EVENT(kvm_wfx,
  40        TP_PROTO(unsigned long vcpu_pc, bool is_wfe),
  41        TP_ARGS(vcpu_pc, is_wfe),
  42
  43        TP_STRUCT__entry(
  44                __field(        unsigned long,  vcpu_pc         )
  45                __field(                 bool,  is_wfe          )
  46        ),
  47
  48        TP_fast_assign(
  49                __entry->vcpu_pc                = vcpu_pc;
  50                __entry->is_wfe                 = is_wfe;
  51        ),
  52
  53        TP_printk("guest executed wf%c at: 0x%08lx",
  54                __entry->is_wfe ? 'e' : 'i', __entry->vcpu_pc)
  55);
  56
  57TRACE_EVENT(kvm_hvc,
  58        TP_PROTO(unsigned long vcpu_pc, unsigned long r0, unsigned long imm),
  59        TP_ARGS(vcpu_pc, r0, imm),
  60
  61        TP_STRUCT__entry(
  62                __field(        unsigned long,  vcpu_pc         )
  63                __field(        unsigned long,  r0              )
  64                __field(        unsigned long,  imm             )
  65        ),
  66
  67        TP_fast_assign(
  68                __entry->vcpu_pc                = vcpu_pc;
  69                __entry->r0             = r0;
  70                __entry->imm            = imm;
  71        ),
  72
  73        TP_printk("HVC at 0x%08lx (r0: 0x%08lx, imm: 0x%lx",
  74                  __entry->vcpu_pc, __entry->r0, __entry->imm)
  75);
  76
  77#endif /* _TRACE_ARM_KVM_H */
  78
  79#undef TRACE_INCLUDE_PATH
  80#define TRACE_INCLUDE_PATH .
  81#undef TRACE_INCLUDE_FILE
  82#define TRACE_INCLUDE_FILE trace
  83
  84/* This part must be outside protection */
  85#include <trace/define_trace.h>
  86