^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)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #define TRACE_SYSTEM hyperv
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #if !defined(_HV_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define _HV_TRACE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) DECLARE_EVENT_CLASS(vmbus_hdr_msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) TP_PROTO(const struct vmbus_channel_message_header *hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) TP_ARGS(hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) TP_STRUCT__entry(__field(unsigned int, msgtype)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) TP_fast_assign(__entry->msgtype = hdr->msgtype;),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) TP_printk("msgtype=%u", __entry->msgtype)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) DEFINE_EVENT(vmbus_hdr_msg, vmbus_on_msg_dpc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) TP_PROTO(const struct vmbus_channel_message_header *hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) TP_ARGS(hdr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) DEFINE_EVENT(vmbus_hdr_msg, vmbus_on_message,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) TP_PROTO(const struct vmbus_channel_message_header *hdr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) TP_ARGS(hdr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) TRACE_EVENT(vmbus_onoffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) TP_PROTO(const struct vmbus_channel_offer_channel *offer),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) TP_ARGS(offer),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) __field(u8, monitorid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) __field(u16, is_ddc_int)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) __field(u32, connection_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) __array(char, if_type, 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) __array(char, if_instance, 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) __field(u16, chn_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) __field(u16, mmio_mb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) __field(u16, sub_idx)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) TP_fast_assign(__entry->child_relid = offer->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) __entry->monitorid = offer->monitorid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) __entry->is_ddc_int = offer->is_dedicated_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) __entry->connection_id = offer->connection_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) export_guid(__entry->if_type, &offer->offer.if_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) export_guid(__entry->if_instance, &offer->offer.if_instance);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) __entry->chn_flags = offer->offer.chn_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) __entry->mmio_mb = offer->offer.mmio_megabytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) __entry->sub_idx = offer->offer.sub_channel_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) TP_printk("child_relid 0x%x, monitorid 0x%x, is_dedicated %d, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) "connection_id 0x%x, if_type %pUl, if_instance %pUl, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) "chn_flags 0x%x, mmio_megabytes %d, sub_channel_index %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) __entry->child_relid, __entry->monitorid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) __entry->is_ddc_int, __entry->connection_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) __entry->if_type, __entry->if_instance,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) __entry->chn_flags, __entry->mmio_mb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) __entry->sub_idx
^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)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) TRACE_EVENT(vmbus_onoffer_rescind,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) TP_PROTO(const struct vmbus_channel_rescind_offer *offer),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) TP_ARGS(offer),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) TP_STRUCT__entry(__field(u32, child_relid)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) TP_fast_assign(__entry->child_relid = offer->child_relid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) TP_printk("child_relid 0x%x", __entry->child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) TRACE_EVENT(vmbus_onopen_result,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) TP_PROTO(const struct vmbus_channel_open_result *result),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) TP_ARGS(result),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) __field(u32, openid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) __field(u32, status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) TP_fast_assign(__entry->child_relid = result->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) __entry->openid = result->openid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) __entry->status = result->status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) TP_printk("child_relid 0x%x, openid %d, status %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) __entry->child_relid, __entry->openid, __entry->status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) TRACE_EVENT(vmbus_ongpadl_created,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) TP_PROTO(const struct vmbus_channel_gpadl_created *gpadlcreated),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) TP_ARGS(gpadlcreated),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) __field(u32, gpadl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) __field(u32, status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) TP_fast_assign(__entry->child_relid = gpadlcreated->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) __entry->gpadl = gpadlcreated->gpadl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) __entry->status = gpadlcreated->creation_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) TP_printk("child_relid 0x%x, gpadl 0x%x, creation_status %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) __entry->child_relid, __entry->gpadl, __entry->status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) TRACE_EVENT(vmbus_ongpadl_torndown,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) TP_PROTO(const struct vmbus_channel_gpadl_torndown *gpadltorndown),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) TP_ARGS(gpadltorndown),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) TP_STRUCT__entry(__field(u32, gpadl)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) TP_fast_assign(__entry->gpadl = gpadltorndown->gpadl),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) TP_printk("gpadl 0x%x", __entry->gpadl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) TRACE_EVENT(vmbus_onversion_response,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) TP_PROTO(const struct vmbus_channel_version_response *response),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) TP_ARGS(response),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) __field(u8, ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) TP_fast_assign(__entry->ver = response->version_supported;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) TP_printk("version_supported %d", __entry->ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) TRACE_EVENT(vmbus_request_offers,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) TP_PROTO(int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) TP_ARGS(ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) TP_STRUCT__entry(__field(int, ret)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) TP_fast_assign(__entry->ret = ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) TP_printk("sending ret %d", __entry->ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) TRACE_EVENT(vmbus_open,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) TP_PROTO(const struct vmbus_channel_open_channel *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) __field(u32, openid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) __field(u32, gpadlhandle)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) __field(u32, target_vp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) __field(u32, offset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) __entry->openid = msg->openid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) __entry->gpadlhandle = msg->ringbuffer_gpadlhandle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) __entry->target_vp = msg->target_vp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) __entry->offset = msg->downstream_ringbuffer_pageoffset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) TP_printk("sending child_relid 0x%x, openid %d, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) "gpadlhandle 0x%x, target_vp 0x%x, offset 0x%x, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) __entry->child_relid, __entry->openid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) __entry->gpadlhandle, __entry->target_vp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) __entry->offset, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) TRACE_EVENT(vmbus_close_internal,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) TP_PROTO(const struct vmbus_channel_close_channel *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) TP_printk("sending child_relid 0x%x, ret %d", __entry->child_relid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) __entry->ret)
^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_EVENT(vmbus_establish_gpadl_header,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) TP_PROTO(const struct vmbus_channel_gpadl_header *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) __field(u32, gpadl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) __field(u16, range_buflen)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) __field(u16, rangecount)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) __entry->gpadl = msg->gpadl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) __entry->range_buflen = msg->range_buflen;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) __entry->rangecount = msg->rangecount;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) TP_printk("sending child_relid 0x%x, gpadl 0x%x, range_buflen %d "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) "rangecount %d, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) __entry->child_relid, __entry->gpadl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) __entry->range_buflen, __entry->rangecount, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) TRACE_EVENT(vmbus_establish_gpadl_body,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) TP_PROTO(const struct vmbus_channel_gpadl_body *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) __field(u32, msgnumber)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) __field(u32, gpadl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) __entry->msgnumber = msg->msgnumber;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) __entry->gpadl = msg->gpadl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) TP_printk("sending msgnumber %d, gpadl 0x%x, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) __entry->msgnumber, __entry->gpadl, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) )
^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) TRACE_EVENT(vmbus_teardown_gpadl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) TP_PROTO(const struct vmbus_channel_gpadl_teardown *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) __field(u32, gpadl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) __entry->gpadl = msg->gpadl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) TP_printk("sending child_relid 0x%x, gpadl 0x%x, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) __entry->child_relid, __entry->gpadl, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) TRACE_EVENT(vmbus_negotiate_version,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) TP_PROTO(const struct vmbus_channel_initiate_contact *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) __field(u32, ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) __field(u32, target_vcpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) __field(u64, int_page)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) __field(u64, mon_page1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) __field(u64, mon_page2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) __entry->ver = msg->vmbus_version_requested;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) __entry->target_vcpu = msg->target_vcpu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) __entry->int_page = msg->interrupt_page;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) __entry->mon_page1 = msg->monitor_page1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) __entry->mon_page2 = msg->monitor_page2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) TP_printk("sending vmbus_version_requested %d, target_vcpu 0x%x, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) "pages %llx:%llx:%llx, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) __entry->ver, __entry->target_vcpu, __entry->int_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) __entry->mon_page1, __entry->mon_page2, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) TRACE_EVENT(vmbus_release_relid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) TP_PROTO(const struct vmbus_channel_relid_released *msg, int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) TP_printk("sending child_relid 0x%x, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) __entry->child_relid, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) TRACE_EVENT(vmbus_send_tl_connect_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) TP_PROTO(const struct vmbus_channel_tl_connect_request *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) __array(char, guest_id, 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) __array(char, host_id, 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) export_guid(__entry->guest_id, &msg->guest_endpoint_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) export_guid(__entry->host_id, &msg->host_service_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) TP_printk("sending guest_endpoint_id %pUl, host_service_id %pUl, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) "ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) __entry->guest_id, __entry->host_id, __entry->ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) )
^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) TRACE_EVENT(vmbus_send_modifychannel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) TP_PROTO(const struct vmbus_channel_modifychannel *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) int ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) TP_ARGS(msg, ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) __field(u32, child_relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) __field(u32, target_vp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) __field(int, ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) __entry->child_relid = msg->child_relid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) __entry->target_vp = msg->target_vp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) __entry->ret = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) TP_printk("binding child_relid 0x%x to target_vp 0x%x, ret %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) __entry->child_relid, __entry->target_vp, __entry->ret
^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) DECLARE_EVENT_CLASS(vmbus_channel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) TP_PROTO(const struct vmbus_channel *channel),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) TP_ARGS(channel),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) TP_STRUCT__entry(__field(u32, relid)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) TP_fast_assign(__entry->relid = channel->offermsg.child_relid),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) TP_printk("relid 0x%x", __entry->relid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) DEFINE_EVENT(vmbus_channel, vmbus_chan_sched,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) TP_PROTO(const struct vmbus_channel *channel),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) TP_ARGS(channel)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) DEFINE_EVENT(vmbus_channel, vmbus_setevent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) TP_PROTO(const struct vmbus_channel *channel),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) TP_ARGS(channel)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) DEFINE_EVENT(vmbus_channel, vmbus_on_event,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) TP_PROTO(const struct vmbus_channel *channel),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) TP_ARGS(channel)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) #undef TRACE_INCLUDE_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) #undef TRACE_INCLUDE_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) #define TRACE_INCLUDE_FILE hv_trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) #endif /* _HV_TRACE_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) #include <trace/define_trace.h>