2 * Copyright (c) 2014-2018, Intel Corporation
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12 * * Neither the name of Intel Corporation nor the names of its contributors
13 * may be used to endorse or promote products derived from this software
14 * without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
31 #include "pt_packet_decoder.h"
32 #include "pt_query_decoder.h"
33 #include "pt_encoder.h"
34 #include "pt_opcodes.h"
41 /* A test fixture providing everything needed for packet en- and de-coding. */
42 struct packet_fixture {
43 /* The trace buffer. */
46 /* Two packets for encoding[0] and decoding[1]. */
47 struct pt_packet packet[2];
49 /* The configuration. */
50 struct pt_config config;
53 struct pt_encoder encoder;
56 struct pt_packet_decoder decoder;
58 /* The return value for an unknown decode. */
61 /* The test fixture initialization and finalization functions. */
62 struct ptunit_result (*init)(struct packet_fixture *);
63 struct ptunit_result (*fini)(struct packet_fixture *);
66 static int pfix_decode_unknown(struct pt_packet_unknown *packet,
67 const struct pt_config *config,
68 const uint8_t *pos, void *context)
70 struct packet_fixture *pfix;
72 if (!packet || !config)
75 pfix = (struct packet_fixture *) context;
79 if (config->begin != pfix->buffer)
82 if (config->end != pfix->buffer + sizeof(pfix->buffer))
85 if (pos != pfix->buffer)
93 static struct ptunit_result pfix_init(struct packet_fixture *pfix)
97 memset(pfix->buffer, 0, sizeof(pfix->buffer));
98 memset(pfix->packet, 0, sizeof(pfix->packet));
99 memset(&pfix->config, 0, sizeof(pfix->config));
100 pfix->config.size = sizeof(pfix->config);
101 pfix->config.begin = pfix->buffer;
102 pfix->config.end = pfix->buffer + sizeof(pfix->buffer);
103 pfix->config.decode.callback = pfix_decode_unknown;
104 pfix->config.decode.context = pfix;
106 pt_encoder_init(&pfix->encoder, &pfix->config);
107 pt_pkt_decoder_init(&pfix->decoder, &pfix->config);
109 errcode = pt_pkt_sync_set(&pfix->decoder, 0x0ull);
110 ptu_int_eq(errcode, 0);
117 static struct ptunit_result pfix_fini(struct packet_fixture *pfix)
119 pt_encoder_fini(&pfix->encoder);
120 pt_pkt_decoder_fini(&pfix->decoder);
125 static struct ptunit_result ptu_pkt_eq(const struct pt_packet *enc,
126 const struct pt_packet *dec)
128 const uint8_t *renc, *rdec;
134 renc = (const uint8_t *) enc;
135 rdec = (const uint8_t *) dec;
137 for (byte = 0; byte < sizeof(*enc); ++byte)
138 ptu_uint_eq(renc[byte], rdec[byte]);
143 static struct ptunit_result pfix_test(struct packet_fixture *pfix)
147 size = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
150 pfix->packet[0].size = (uint8_t) size;
152 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
153 sizeof(pfix->packet[1]));
156 return ptu_pkt_eq(&pfix->packet[0], &pfix->packet[1]);
159 static struct ptunit_result no_payload(struct packet_fixture *pfix,
160 enum pt_packet_type type)
162 pfix->packet[0].type = type;
164 ptu_test(pfix_test, pfix);
169 static struct ptunit_result unknown(struct packet_fixture *pfix, int exp)
173 pfix->buffer[0] = pt_opc_bad;
176 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
177 sizeof(pfix->packet[1]));
178 ptu_int_eq(size, pfix->unknown);
181 ptu_int_eq(pfix->packet[1].type, ppt_unknown);
182 ptu_uint_eq(pfix->packet[1].size, (uint8_t) size);
183 ptu_ptr_eq(pfix->packet[1].payload.unknown.packet,
185 ptu_ptr_eq(pfix->packet[1].payload.unknown.priv, pfix);
191 static struct ptunit_result unknown_ext(struct packet_fixture *pfix, int exp)
195 pfix->buffer[0] = pt_opc_ext;
196 pfix->buffer[1] = pt_ext_bad;
199 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
200 sizeof(pfix->packet[1]));
201 ptu_int_eq(size, pfix->unknown);
204 ptu_int_eq(pfix->packet[1].type, ppt_unknown);
205 ptu_uint_eq(pfix->packet[1].size, (uint8_t) size);
206 ptu_ptr_eq(pfix->packet[1].payload.unknown.packet,
208 ptu_ptr_eq(pfix->packet[1].payload.unknown.priv, pfix);
214 static struct ptunit_result unknown_ext2(struct packet_fixture *pfix, int exp)
218 pfix->buffer[0] = pt_opc_ext;
219 pfix->buffer[1] = pt_ext_ext2;
220 pfix->buffer[2] = pt_ext2_bad;
223 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
224 sizeof(pfix->packet[1]));
225 ptu_int_eq(size, exp);
228 ptu_int_eq(pfix->packet[1].type, ppt_unknown);
229 ptu_uint_eq(pfix->packet[1].size, (uint8_t) size);
230 ptu_ptr_eq(pfix->packet[1].payload.unknown.packet,
232 ptu_ptr_eq(pfix->packet[1].payload.unknown.priv, pfix);
238 static struct ptunit_result tnt_8(struct packet_fixture *pfix)
240 pfix->packet[0].type = ppt_tnt_8;
241 pfix->packet[0].payload.tnt.bit_size = 4;
242 pfix->packet[0].payload.tnt.payload = 0x5ull;
244 ptu_test(pfix_test, pfix);
249 static struct ptunit_result tnt_64(struct packet_fixture *pfix)
251 pfix->packet[0].type = ppt_tnt_64;
252 pfix->packet[0].payload.tnt.bit_size = 23;
253 pfix->packet[0].payload.tnt.payload = 0xabcdeull;
255 ptu_test(pfix_test, pfix);
260 static struct ptunit_result ip(struct packet_fixture *pfix,
261 enum pt_packet_type type,
262 enum pt_ip_compression ipc,
265 pfix->packet[0].type = type;
266 pfix->packet[0].payload.ip.ipc = ipc;
267 pfix->packet[0].payload.ip.ip = ip;
269 ptu_test(pfix_test, pfix);
274 static struct ptunit_result mode_exec(struct packet_fixture *pfix,
275 enum pt_exec_mode mode)
277 struct pt_packet_mode_exec packet;
279 packet = pt_set_exec_mode(mode);
281 pfix->packet[0].type = ppt_mode;
282 pfix->packet[0].payload.mode.leaf = pt_mol_exec;
283 pfix->packet[0].payload.mode.bits.exec.csl = packet.csl;
284 pfix->packet[0].payload.mode.bits.exec.csd = packet.csd;
286 ptu_test(pfix_test, pfix);
291 static struct ptunit_result mode_tsx(struct packet_fixture *pfix)
293 pfix->packet[0].type = ppt_mode;
294 pfix->packet[0].payload.mode.leaf = pt_mol_tsx;
295 pfix->packet[0].payload.mode.bits.tsx.intx = 1;
297 ptu_test(pfix_test, pfix);
302 static struct ptunit_result pip(struct packet_fixture *pfix)
304 pfix->packet[0].type = ppt_pip;
305 pfix->packet[0].payload.pip.cr3 = 0x4200ull;
306 pfix->packet[0].payload.pip.nr = 1;
308 ptu_test(pfix_test, pfix);
313 static struct ptunit_result tsc(struct packet_fixture *pfix)
315 pfix->packet[0].type = ppt_tsc;
316 pfix->packet[0].payload.tsc.tsc = 0x42ull;
318 ptu_test(pfix_test, pfix);
323 static struct ptunit_result cbr(struct packet_fixture *pfix)
325 pfix->packet[0].type = ppt_cbr;
326 pfix->packet[0].payload.cbr.ratio = 0x23;
328 ptu_test(pfix_test, pfix);
333 static struct ptunit_result tma(struct packet_fixture *pfix)
335 pfix->packet[0].type = ppt_tma;
336 pfix->packet[0].payload.tma.ctc = 0x42;
337 pfix->packet[0].payload.tma.fc = 0x123;
339 ptu_test(pfix_test, pfix);
344 static struct ptunit_result tma_bad(struct packet_fixture *pfix)
348 pfix->packet[0].type = ppt_tma;
349 pfix->packet[0].payload.tma.ctc = 0x42;
350 pfix->packet[0].payload.tma.fc = 0x200;
352 errcode = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
353 ptu_int_eq(errcode, -pte_bad_packet);
358 static struct ptunit_result mtc(struct packet_fixture *pfix)
360 pfix->packet[0].type = ppt_mtc;
361 pfix->packet[0].payload.mtc.ctc = 0x23;
363 ptu_test(pfix_test, pfix);
368 static struct ptunit_result cyc(struct packet_fixture *pfix)
370 pfix->packet[0].type = ppt_cyc;
371 pfix->packet[0].payload.cyc.value = 0x23;
373 ptu_test(pfix_test, pfix);
378 static struct ptunit_result vmcs(struct packet_fixture *pfix)
380 pfix->packet[0].type = ppt_vmcs;
381 pfix->packet[0].payload.vmcs.base = 0xabcdef000ull;
383 ptu_test(pfix_test, pfix);
388 static struct ptunit_result mnt(struct packet_fixture *pfix)
390 pfix->packet[0].type = ppt_mnt;
391 pfix->packet[0].payload.mnt.payload = 0x1234567890abcdefull;
393 ptu_test(pfix_test, pfix);
398 static struct ptunit_result exstop(struct packet_fixture *pfix, int ip)
400 pfix->packet[0].type = ppt_exstop;
401 pfix->packet[0].payload.exstop.ip = ip ? 1 : 0;
403 ptu_test(pfix_test, pfix);
408 static struct ptunit_result mwait(struct packet_fixture *pfix)
410 pfix->packet[0].type = ppt_mwait;
411 pfix->packet[0].payload.mwait.hints = 0xc;
412 pfix->packet[0].payload.mwait.ext = 0x1;
414 ptu_test(pfix_test, pfix);
419 static struct ptunit_result pwre(struct packet_fixture *pfix)
421 pfix->packet[0].type = ppt_pwre;
422 pfix->packet[0].payload.pwre.state = 0x0;
423 pfix->packet[0].payload.pwre.sub_state = 0x3;
424 pfix->packet[0].payload.pwre.hw = 1;
426 ptu_test(pfix_test, pfix);
431 static struct ptunit_result pwrx(struct packet_fixture *pfix)
433 pfix->packet[0].type = ppt_pwrx;
434 pfix->packet[0].payload.pwrx.last = 0x3;
435 pfix->packet[0].payload.pwrx.deepest = 0xa;
436 pfix->packet[0].payload.pwrx.store = 1;
438 ptu_test(pfix_test, pfix);
443 static struct ptunit_result ptw(struct packet_fixture *pfix, uint8_t plc,
449 size = pt_ptw_size(plc);
452 pl = 0x1234567890abcdefull;
454 ptu_uint_le((size_t) size, sizeof(mask));
455 mask = ~0ull >> ((sizeof(mask) - (size_t) size) * 8);
457 pfix->packet[0].type = ppt_ptw;
458 pfix->packet[0].payload.ptw.payload = pl & mask;
459 pfix->packet[0].payload.ptw.plc = plc;
460 pfix->packet[0].payload.ptw.ip = ip ? 1 : 0;
462 ptu_test(pfix_test, pfix);
467 static struct ptunit_result cutoff(struct packet_fixture *pfix,
468 enum pt_packet_type type)
472 pfix->packet[0].type = type;
474 size = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
477 pfix->decoder.config.end = pfix->encoder.pos - 1;
479 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
480 sizeof(pfix->packet[1]));
481 ptu_int_eq(size, -pte_eos);
486 static struct ptunit_result cutoff_ip(struct packet_fixture *pfix,
487 enum pt_packet_type type)
491 pfix->packet[0].type = type;
492 pfix->packet[0].payload.ip.ipc = pt_ipc_sext_48;
494 size = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
497 pfix->decoder.config.end = pfix->encoder.pos - 1;
499 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
500 sizeof(pfix->packet[1]));
501 ptu_int_eq(size, -pte_eos);
506 static struct ptunit_result cutoff_cyc(struct packet_fixture *pfix)
510 pfix->packet[0].type = ppt_cyc;
511 pfix->packet[0].payload.cyc.value = 0xa8;
513 size = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
516 pfix->decoder.config.end = pfix->encoder.pos - 1;
518 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
519 sizeof(pfix->packet[1]));
520 ptu_int_eq(size, -pte_eos);
525 static struct ptunit_result cutoff_mode(struct packet_fixture *pfix,
526 enum pt_mode_leaf leaf)
530 pfix->packet[0].type = ppt_mode;
531 pfix->packet[0].payload.mode.leaf = leaf;
533 size = pt_enc_next(&pfix->encoder, &pfix->packet[0]);
536 pfix->decoder.config.end = pfix->encoder.pos - 1;
538 size = pt_pkt_next(&pfix->decoder, &pfix->packet[1],
539 sizeof(pfix->packet[1]));
540 ptu_int_eq(size, -pte_eos);
545 int main(int argc, char **argv)
547 struct packet_fixture pfix;
548 struct ptunit_suite suite;
550 pfix.init = pfix_init;
551 pfix.fini = pfix_fini;
553 suite = ptunit_mk_suite(argc, argv);
555 ptu_run_fp(suite, no_payload, pfix, ppt_pad);
556 ptu_run_fp(suite, no_payload, pfix, ppt_psb);
557 ptu_run_fp(suite, no_payload, pfix, ppt_ovf);
558 ptu_run_fp(suite, no_payload, pfix, ppt_psbend);
559 ptu_run_fp(suite, no_payload, pfix, ppt_stop);
561 ptu_run_fp(suite, unknown, pfix, 4);
562 ptu_run_fp(suite, unknown, pfix, -pte_nomem);
563 ptu_run_fp(suite, unknown_ext, pfix, 4);
564 ptu_run_fp(suite, unknown_ext, pfix, -pte_nomem);
565 ptu_run_fp(suite, unknown_ext2, pfix, 4);
566 ptu_run_fp(suite, unknown_ext2, pfix, -pte_nomem);
568 ptu_run_f(suite, tnt_8, pfix);
569 ptu_run_f(suite, tnt_64, pfix);
571 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_suppressed, 0x0ull);
572 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_16, 0x42ull);
573 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_32, 0x4200ull);
574 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_48, 0x4200ull);
575 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_sext_48, 0x42ull);
576 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_full, 0x42ull);
578 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_suppressed, 0x0ull);
579 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_16, 0x42ull);
580 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_32, 0x4200ull);
581 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_update_48, 0x4200ull);
582 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_sext_48, 0x42ull);
583 ptu_run_fp(suite, ip, pfix, ppt_tip, pt_ipc_full, 0x42ull);
585 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_suppressed, 0x0ull);
586 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_16, 0x42ull);
587 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_32, 0x4200ull);
588 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_update_48, 0x4200ull);
589 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_sext_48, 0x42ull);
590 ptu_run_fp(suite, ip, pfix, ppt_tip_pge, pt_ipc_full, 0x42ull);
592 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_suppressed, 0x0ull);
593 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_16, 0x42ull);
594 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_32, 0x4200ull);
595 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_update_48, 0x4200ull);
596 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_sext_48, 0x42ull);
597 ptu_run_fp(suite, ip, pfix, ppt_tip_pgd, pt_ipc_full, 0x42ull);
599 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_suppressed, 0x0ull);
600 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_16, 0x42ull);
601 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_32, 0x4200ull);
602 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_update_48, 0x4200ull);
603 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_sext_48, 0x42ull);
604 ptu_run_fp(suite, ip, pfix, ppt_fup, pt_ipc_full, 0x42ull);
606 ptu_run_fp(suite, mode_exec, pfix, ptem_16bit);
607 ptu_run_fp(suite, mode_exec, pfix, ptem_32bit);
608 ptu_run_fp(suite, mode_exec, pfix, ptem_64bit);
609 ptu_run_f(suite, mode_tsx, pfix);
611 ptu_run_f(suite, pip, pfix);
612 ptu_run_f(suite, tsc, pfix);
613 ptu_run_f(suite, cbr, pfix);
614 ptu_run_f(suite, tma, pfix);
615 ptu_run_f(suite, tma_bad, pfix);
616 ptu_run_f(suite, mtc, pfix);
617 ptu_run_f(suite, cyc, pfix);
618 ptu_run_f(suite, vmcs, pfix);
619 ptu_run_f(suite, mnt, pfix);
620 ptu_run_fp(suite, exstop, pfix, 0);
621 ptu_run_fp(suite, exstop, pfix, 1);
622 ptu_run_f(suite, mwait, pfix);
623 ptu_run_f(suite, pwre, pfix);
624 ptu_run_f(suite, pwrx, pfix);
625 ptu_run_fp(suite, ptw, pfix, 0, 1);
626 ptu_run_fp(suite, ptw, pfix, 1, 0);
628 ptu_run_fp(suite, cutoff, pfix, ppt_psb);
629 ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip);
630 ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip_pge);
631 ptu_run_fp(suite, cutoff_ip, pfix, ppt_tip_pgd);
632 ptu_run_fp(suite, cutoff_ip, pfix, ppt_fup);
633 ptu_run_fp(suite, cutoff, pfix, ppt_ovf);
634 ptu_run_fp(suite, cutoff, pfix, ppt_psbend);
635 ptu_run_fp(suite, cutoff, pfix, ppt_tnt_64);
636 ptu_run_fp(suite, cutoff, pfix, ppt_tsc);
637 ptu_run_fp(suite, cutoff, pfix, ppt_cbr);
638 ptu_run_fp(suite, cutoff, pfix, ppt_tma);
639 ptu_run_fp(suite, cutoff, pfix, ppt_mtc);
640 ptu_run_f(suite, cutoff_cyc, pfix);
641 ptu_run_fp(suite, cutoff_mode, pfix, pt_mol_exec);
642 ptu_run_fp(suite, cutoff_mode, pfix, pt_mol_tsx);
643 ptu_run_fp(suite, cutoff, pfix, ppt_vmcs);
644 ptu_run_fp(suite, cutoff, pfix, ppt_mnt);
645 ptu_run_fp(suite, cutoff, pfix, ppt_exstop);
646 ptu_run_fp(suite, cutoff, pfix, ppt_mwait);
647 ptu_run_fp(suite, cutoff, pfix, ppt_pwre);
648 ptu_run_fp(suite, cutoff, pfix, ppt_pwrx);
649 ptu_run_fp(suite, cutoff, pfix, ppt_ptw);
651 return ptunit_report(&suite);
655 /* Dummy decode functions to satisfy link dependencies.
657 * As a nice side-effect, we will know if we need to add more tests when
658 * adding new decoder functions.
660 struct pt_query_decoder;
662 int pt_qry_decode_unknown(struct pt_query_decoder *d)
666 return -pte_internal;
668 int pt_qry_decode_pad(struct pt_query_decoder *d)
672 return -pte_internal;
674 int pt_qry_decode_psb(struct pt_query_decoder *d)
678 return -pte_internal;
680 int pt_qry_decode_tip(struct pt_query_decoder *d)
684 return -pte_internal;
686 int pt_qry_decode_tnt_8(struct pt_query_decoder *d)
690 return -pte_internal;
692 int pt_qry_decode_tnt_64(struct pt_query_decoder *d)
696 return -pte_internal;
698 int pt_qry_decode_tip_pge(struct pt_query_decoder *d)
702 return -pte_internal;
704 int pt_qry_decode_tip_pgd(struct pt_query_decoder *d)
708 return -pte_internal;
710 int pt_qry_decode_fup(struct pt_query_decoder *d)
714 return -pte_internal;
716 int pt_qry_header_fup(struct pt_query_decoder *d)
720 return -pte_internal;
722 int pt_qry_decode_pip(struct pt_query_decoder *d)
726 return -pte_internal;
728 int pt_qry_header_pip(struct pt_query_decoder *d)
732 return -pte_internal;
734 int pt_qry_decode_ovf(struct pt_query_decoder *d)
738 return -pte_internal;
740 int pt_qry_decode_mode(struct pt_query_decoder *d)
744 return -pte_internal;
746 int pt_qry_header_mode(struct pt_query_decoder *d)
750 return -pte_internal;
752 int pt_qry_decode_psbend(struct pt_query_decoder *d)
756 return -pte_internal;
758 int pt_qry_decode_tsc(struct pt_query_decoder *d)
762 return -pte_internal;
764 int pt_qry_header_tsc(struct pt_query_decoder *d)
768 return -pte_internal;
770 int pt_qry_decode_cbr(struct pt_query_decoder *d)
774 return -pte_internal;
776 int pt_qry_header_cbr(struct pt_query_decoder *d)
780 return -pte_internal;
782 int pt_qry_decode_tma(struct pt_query_decoder *d)
786 return -pte_internal;
788 int pt_qry_decode_mtc(struct pt_query_decoder *d)
792 return -pte_internal;
794 int pt_qry_decode_cyc(struct pt_query_decoder *d)
798 return -pte_internal;
800 int pt_qry_decode_stop(struct pt_query_decoder *d)
804 return -pte_internal;
806 int pt_qry_decode_vmcs(struct pt_query_decoder *d)
810 return -pte_internal;
812 int pt_qry_header_vmcs(struct pt_query_decoder *d)
816 return -pte_internal;
818 int pt_qry_decode_mnt(struct pt_query_decoder *d)
822 return -pte_internal;
824 int pt_qry_header_mnt(struct pt_query_decoder *d)
828 return -pte_internal;
830 int pt_qry_decode_exstop(struct pt_query_decoder *d)
834 return -pte_internal;
836 int pt_qry_decode_mwait(struct pt_query_decoder *d)
840 return -pte_internal;
842 int pt_qry_decode_pwre(struct pt_query_decoder *d)
846 return -pte_internal;
848 int pt_qry_decode_pwrx(struct pt_query_decoder *d)
852 return -pte_internal;
854 int pt_qry_decode_ptw(struct pt_query_decoder *d)
858 return -pte_internal;