Lines Matching refs:packet

74 				 struct intel_pt_pkt *packet)
90 packet->type = INTEL_PT_TNT;
91 packet->count = count;
92 packet->payload = payload << 1;
97 struct intel_pt_pkt *packet)
104 packet->type = INTEL_PT_PIP;
106 packet->payload = payload;
111 static int intel_pt_get_tracestop(struct intel_pt_pkt *packet)
113 packet->type = INTEL_PT_TRACESTOP;
118 struct intel_pt_pkt *packet)
122 packet->type = INTEL_PT_CBR;
123 packet->payload = get_unaligned_le16(buf + 2);
128 struct intel_pt_pkt *packet)
133 packet->type = INTEL_PT_VMCS;
134 packet->count = 5;
135 memcpy_le64(&packet->payload, buf + 2, 5);
140 static int intel_pt_get_ovf(struct intel_pt_pkt *packet)
142 packet->type = INTEL_PT_OVF;
147 struct intel_pt_pkt *packet)
159 packet->type = INTEL_PT_PSB;
163 static int intel_pt_get_psbend(struct intel_pt_pkt *packet)
165 packet->type = INTEL_PT_PSBEND;
170 struct intel_pt_pkt *packet)
175 packet->type = INTEL_PT_TMA;
176 packet->payload = buf[2] | (buf[3] << 8);
177 packet->count = buf[5] | ((buf[6] & BIT(0)) << 8);
181 static int intel_pt_get_pad(struct intel_pt_pkt *packet)
183 packet->type = INTEL_PT_PAD;
188 struct intel_pt_pkt *packet)
192 packet->type = INTEL_PT_MNT;
193 packet->payload = get_unaligned_le64(buf + 3);
198 struct intel_pt_pkt *packet)
205 return intel_pt_get_mnt(buf, len, packet);
212 struct intel_pt_pkt *packet)
214 packet->count = (buf[1] >> 5) & 0x3;
215 packet->type = buf[1] & BIT(7) ? INTEL_PT_PTWRITE_IP :
218 switch (packet->count) {
222 packet->payload = get_unaligned_le32(buf + 2);
227 packet->payload = get_unaligned_le64(buf + 2);
234 static int intel_pt_get_exstop(struct intel_pt_pkt *packet)
236 packet->type = INTEL_PT_EXSTOP;
240 static int intel_pt_get_exstop_ip(struct intel_pt_pkt *packet)
242 packet->type = INTEL_PT_EXSTOP_IP;
247 struct intel_pt_pkt *packet)
251 packet->type = INTEL_PT_MWAIT;
252 packet->payload = get_unaligned_le64(buf + 2);
257 struct intel_pt_pkt *packet)
261 packet->type = INTEL_PT_PWRE;
262 memcpy_le64(&packet->payload, buf + 2, 2);
267 struct intel_pt_pkt *packet)
271 packet->type = INTEL_PT_PWRX;
272 memcpy_le64(&packet->payload, buf + 2, 5);
277 struct intel_pt_pkt *packet)
281 packet->type = INTEL_PT_BBP;
282 packet->count = buf[2] >> 7;
283 packet->payload = buf[2] & 0x1f;
288 struct intel_pt_pkt *packet)
292 packet->type = INTEL_PT_BIP;
293 packet->count = buf[0] >> 3;
294 memcpy_le64(&packet->payload, buf + 1, 4);
299 struct intel_pt_pkt *packet)
303 packet->type = INTEL_PT_BIP;
304 packet->count = buf[0] >> 3;
305 packet->payload = get_unaligned_le64(buf + 1);
309 static int intel_pt_get_bep(size_t len, struct intel_pt_pkt *packet)
313 packet->type = INTEL_PT_BEP;
317 static int intel_pt_get_bep_ip(size_t len, struct intel_pt_pkt *packet)
321 packet->type = INTEL_PT_BEP_IP;
326 struct intel_pt_pkt *packet)
330 packet->type = buf[2] & 0x80 ? INTEL_PT_CFE_IP : INTEL_PT_CFE;
331 packet->count = buf[2] & 0x1f;
332 packet->payload = buf[3];
337 struct intel_pt_pkt *packet)
341 packet->type = INTEL_PT_EVD;
342 packet->count = buf[2] & 0x3f;
343 packet->payload = buf[3];
344 packet->payload = get_unaligned_le64(buf + 3);
349 struct intel_pt_pkt *packet)
355 return intel_pt_get_ptwrite(buf, len, packet);
359 return intel_pt_get_long_tnt(buf, len, packet);
361 return intel_pt_get_pip(buf, len, packet);
363 return intel_pt_get_tracestop(packet);
365 return intel_pt_get_cbr(buf, len, packet);
367 return intel_pt_get_vmcs(buf, len, packet);
369 return intel_pt_get_ovf(packet);
371 return intel_pt_get_psb(buf, len, packet);
373 return intel_pt_get_psbend(packet);
375 return intel_pt_get_tma(buf, len, packet);
377 return intel_pt_get_3byte(buf, len, packet);
379 return intel_pt_get_exstop(packet);
381 return intel_pt_get_exstop_ip(packet);
383 return intel_pt_get_mwait(buf, len, packet);
385 return intel_pt_get_pwre(buf, len, packet);
387 return intel_pt_get_pwrx(buf, len, packet);
389 return intel_pt_get_bbp(buf, len, packet);
391 return intel_pt_get_bep(len, packet);
393 return intel_pt_get_bep_ip(len, packet);
395 return intel_pt_get_cfe(buf, len, packet);
397 return intel_pt_get_evd(buf, len, packet);
404 struct intel_pt_pkt *packet)
414 packet->type = INTEL_PT_TNT;
415 packet->count = count;
416 packet->payload = (uint64_t)byte << 57;
422 size_t len, struct intel_pt_pkt *packet)
438 packet->type = INTEL_PT_CYC;
439 packet->payload = payload;
445 struct intel_pt_pkt *packet)
449 packet->count = byte >> 5;
451 switch (packet->count) {
459 packet->payload = get_unaligned_le16(buf + 1);
465 packet->payload = get_unaligned_le32(buf + 1);
472 memcpy_le64(&packet->payload, buf + 1, 6);
478 packet->payload = get_unaligned_le64(buf + 1);
484 packet->type = type;
490 struct intel_pt_pkt *packet)
497 packet->type = INTEL_PT_MODE_EXEC;
498 packet->count = buf[1];
501 packet->payload = 16;
504 packet->payload = 64;
507 packet->payload = 32;
514 packet->type = INTEL_PT_MODE_TSX;
517 packet->payload = buf[1] & 3;
527 struct intel_pt_pkt *packet)
531 packet->type = INTEL_PT_TSC;
532 memcpy_le64(&packet->payload, buf + 1, 7);
537 struct intel_pt_pkt *packet)
541 packet->type = INTEL_PT_MTC;
542 packet->payload = buf[1];
547 struct intel_pt_pkt *packet,
552 memset(packet, 0, sizeof(struct intel_pt_pkt));
564 return intel_pt_get_bip_4(buf, len, packet);
568 return intel_pt_get_bip_8(buf, len, packet);
576 return intel_pt_get_pad(packet);
578 return intel_pt_get_ext(buf, len, packet);
579 return intel_pt_get_short_tnt(byte, packet);
583 return intel_pt_get_cyc(byte, buf, len, packet);
587 return intel_pt_get_ip(INTEL_PT_TIP, byte, buf, len, packet);
590 packet);
593 packet);
595 return intel_pt_get_ip(INTEL_PT_FUP, byte, buf, len, packet);
599 return intel_pt_get_mode(buf, len, packet);
601 return intel_pt_get_tsc(buf, len, packet);
603 return intel_pt_get_mtc(buf, len, packet);
612 void intel_pt_upd_pkt_ctx(const struct intel_pt_pkt *packet,
615 switch (packet->type) {
654 if (packet->count)
665 struct intel_pt_pkt *packet, enum intel_pt_pkt_ctx *ctx)
669 ret = intel_pt_do_get_packet(buf, len, packet, *ctx);
673 intel_pt_upd_pkt_ctx(packet, ctx);
678 int intel_pt_pkt_desc(const struct intel_pt_pkt *packet, char *buf,
682 unsigned long long payload = packet->payload;
683 const char *name = intel_pt_pkt_name(packet->type);
685 switch (packet->type) {
701 for (i = 0; i < packet->count; i++) {
712 ret = snprintf(buf, blen, " (%d)", packet->count);
722 if (!(packet->count))
734 (unsigned)payload, packet->count);
737 name, !!(packet->count & 4), payload);
743 nr = packet->payload & INTEL_PT_VMX_NR_FLAG ? 1 : 0;
775 name, packet->count ? "4" : "8", payload);
778 name, packet->count, payload);
782 name, packet->type == INTEL_PT_CFE_IP, packet->count, payload);
785 name, packet->count, payload);
790 name, payload, packet->count);