Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #if !defined(_TRACE_KVMS390_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define _TRACE_KVMS390_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #define TRACE_SYSTEM kvm-s390
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #undef TRACE_INCLUDE_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #define TRACE_INCLUDE_FILE trace-s390
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  * The TRACE_SYSTEM_VAR defaults to TRACE_SYSTEM, but must be a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * legitimate C variable. It is not exported to user space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #undef TRACE_SYSTEM_VAR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #define TRACE_SYSTEM_VAR kvm_s390
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * Trace point for the creation of the kvm instance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) TRACE_EVENT(kvm_s390_create_vm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	    TP_PROTO(unsigned long type),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	    TP_ARGS(type),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		    __field(unsigned long, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 		    __entry->type = type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	    TP_printk("create vm%s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		      __entry->type & KVM_VM_S390_UCONTROL ? " (UCONTROL)" : "")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)  * Trace points for creation and destruction of vpcus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) TRACE_EVENT(kvm_s390_create_vcpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	    TP_PROTO(unsigned int id, struct kvm_vcpu *vcpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		     struct kvm_s390_sie_block *sie_block),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	    TP_ARGS(id, vcpu, sie_block),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		    __field(unsigned int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		    __field(struct kvm_vcpu *, vcpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		    __field(struct kvm_s390_sie_block *, sie_block)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		    __entry->vcpu = vcpu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		    __entry->sie_block = sie_block;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	    TP_printk("create cpu %d at 0x%pK, sie block at 0x%pK",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		      __entry->id, __entry->vcpu, __entry->sie_block)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) TRACE_EVENT(kvm_s390_destroy_vcpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	    TP_PROTO(unsigned int id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	    TP_ARGS(id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		    __field(unsigned int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	    TP_printk("destroy cpu %d", __entry->id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)  * Trace point for start and stop of vpcus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) TRACE_EVENT(kvm_s390_vcpu_start_stop,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	    TP_PROTO(unsigned int id, int state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	    TP_ARGS(id, state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		    __field(unsigned int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		    __field(int, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		    __entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	    TP_printk("%s cpu %d", __entry->state ? "starting" : "stopping",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		      __entry->id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)  * Trace points for injection of interrupts, either per machine or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)  * per vcpu.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define kvm_s390_int_type						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	{KVM_S390_SIGP_STOP, "sigp stop"},				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	{KVM_S390_PROGRAM_INT, "program interrupt"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	{KVM_S390_SIGP_SET_PREFIX, "sigp set prefix"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	{KVM_S390_RESTART, "sigp restart"},				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	{KVM_S390_INT_PFAULT_INIT, "pfault init"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	{KVM_S390_INT_PFAULT_DONE, "pfault done"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	{KVM_S390_MCHK, "machine check"},				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	{KVM_S390_INT_CLOCK_COMP, "clock comparator"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	{KVM_S390_INT_CPU_TIMER, "cpu timer"},				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	{KVM_S390_INT_VIRTIO, "virtio interrupt"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	{KVM_S390_INT_SERVICE, "sclp interrupt"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	{KVM_S390_INT_EMERGENCY, "sigp emergency"},			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	{KVM_S390_INT_EXTERNAL_CALL, "sigp ext call"}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) #define get_irq_name(__type) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	(__type > KVM_S390_INT_IO_MAX ? \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	__print_symbolic(__type, kvm_s390_int_type) : \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		(__type & KVM_S390_INT_IO_AI_MASK ? \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		 "adapter I/O interrupt" : "subchannel I/O interrupt"))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) TRACE_EVENT(kvm_s390_inject_vm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	    TP_PROTO(__u64 type, __u32 parm, __u64 parm64, int who),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	    TP_ARGS(type, parm, parm64, who),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		    __field(__u32, inttype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		    __field(__u32, parm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		    __field(__u64, parm64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		    __field(int, who)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		    __entry->inttype = type & 0x00000000ffffffff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		    __entry->parm = parm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		    __entry->parm64 = parm64;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		    __entry->who = who;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	    TP_printk("inject%s: type:%x (%s) parm:%x parm64:%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		      (__entry->who == 1) ? " (from kernel)" :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		      (__entry->who == 2) ? " (from user)" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		      __entry->inttype, get_irq_name(__entry->inttype),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		      __entry->parm, __entry->parm64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) TRACE_EVENT(kvm_s390_inject_vcpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	    TP_PROTO(unsigned int id, __u64 type, __u32 parm, __u64 parm64),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	    TP_ARGS(id, type, parm, parm64),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 		    __field(int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		    __field(__u32, inttype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		    __field(__u32, parm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		    __field(__u64, parm64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		    __entry->inttype = type & 0x00000000ffffffff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		    __entry->parm = parm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		    __entry->parm64 = parm64;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	    TP_printk("inject (vcpu %d): type:%x (%s) parm:%x parm64:%llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		      __entry->id, __entry->inttype,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		      get_irq_name(__entry->inttype), __entry->parm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		      __entry->parm64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)  * Trace point for the actual delivery of interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) TRACE_EVENT(kvm_s390_deliver_interrupt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	    TP_PROTO(unsigned int id, __u64 type, __u64 data0, __u64 data1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	    TP_ARGS(id, type, data0, data1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		    __field(int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		    __field(__u32, inttype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		    __field(__u64, data0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		    __field(__u64, data1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		    __entry->inttype = type & 0x00000000ffffffff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		    __entry->data0 = data0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		    __entry->data1 = data1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	    TP_printk("deliver interrupt (vcpu %d): type:%x (%s) "	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		      "data:%08llx %016llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		      __entry->id, __entry->inttype,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		      get_irq_name(__entry->inttype), __entry->data0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		      __entry->data1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)  * Trace point for resets that may be requested from userspace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) TRACE_EVENT(kvm_s390_request_resets,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	    TP_PROTO(__u64 resets),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	    TP_ARGS(resets),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 		    __field(__u64, resets)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 		    __entry->resets = resets;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	    TP_printk("requesting userspace resets %llx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		      __entry->resets)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)  * Trace point for a vcpu's stop requests.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) TRACE_EVENT(kvm_s390_stop_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	    TP_PROTO(unsigned char stop_irq, unsigned char flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	    TP_ARGS(stop_irq, flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 		    __field(unsigned char, stop_irq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		    __field(unsigned char, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		    __entry->stop_irq = stop_irq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 		    __entry->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	    TP_printk("stop request, stop irq = %u, flags = %08x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		      __entry->stop_irq, __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)  * Trace point for enabling channel I/O instruction support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) TRACE_EVENT(kvm_s390_enable_css,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	    TP_PROTO(void *kvm),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	    TP_ARGS(kvm),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 		    __field(void *, kvm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 		    __entry->kvm = kvm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	    TP_printk("enabling channel I/O support (kvm @ %pK)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 		      __entry->kvm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)  * Trace point for enabling and disabling interlocking-and-broadcasting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)  * suppression.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) TRACE_EVENT(kvm_s390_enable_disable_ibs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	    TP_PROTO(unsigned int id, int state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	    TP_ARGS(id, state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 		    __field(unsigned int, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 		    __field(int, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 		    __entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	    TP_printk("%s ibs on cpu %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 		      __entry->state ? "enabling" : "disabling", __entry->id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)  * Trace point for modifying ais mode for a given isc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) TRACE_EVENT(kvm_s390_modify_ais_mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	    TP_PROTO(__u8 isc, __u16 from, __u16 to),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	    TP_ARGS(isc, from, to),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 		    __field(__u8, isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 		    __field(__u16, from)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 		    __field(__u16, to)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 		    __entry->isc = isc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 		    __entry->from = from;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 		    __entry->to = to;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	    TP_printk("for isc %x, modifying interruption mode from %s to %s",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 		      __entry->isc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 		      (__entry->from == KVM_S390_AIS_MODE_ALL) ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 		      "ALL-Interruptions Mode" :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 		      (__entry->from == KVM_S390_AIS_MODE_SINGLE) ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 		      "Single-Interruption Mode" : "No-Interruptions Mode",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 		      (__entry->to == KVM_S390_AIS_MODE_ALL) ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 		      "ALL-Interruptions Mode" :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 		      (__entry->to == KVM_S390_AIS_MODE_SINGLE) ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 		      "Single-Interruption Mode" : "No-Interruptions Mode")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)  * Trace point for suppressed adapter I/O interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) TRACE_EVENT(kvm_s390_airq_suppressed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	    TP_PROTO(__u32 id, __u8 isc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	    TP_ARGS(id, isc),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	    TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 		    __field(__u32, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 		    __field(__u8, isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	    TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 		    __entry->id = id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 		    __entry->isc = isc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 		    ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	    TP_printk("adapter I/O interrupt suppressed (id:%x isc:%x)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 		      __entry->id, __entry->isc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) #endif /* _TRACE_KVMS390_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) #include <trace/define_trace.h>