aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-09-02 08:15:30 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-04 11:01:03 -0400
commit978260cdbec3e34a3dfb2277ffc0aa1809457362 (patch)
tree28bc4fa3328f32368cfaf9dfbe99e28590b5e947 /tools/perf
parentac1c8859a81e2fc45db1dbff30bdc572005734ca (diff)
x86/insn: perf tools: Add new memory protection keys instructions
Add rdpkru and wrpkru to the op code map and the perf tools new instructions test. In the case of the test, only the bytes can be tested at the moment since binutils doesn't support the instructions yet. To run the test: $ tools/perf/perf test "x86 ins" 39: Test x86 instruction decoder - new instructions : Ok Or to see the details: $ tools/perf/perf test -v "x86 ins" 2>&1 | grep pkru For information about rdpkru and wrpkru, refer the Intel SDM. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Qiaowei Ren <qiaowei.ren@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1441196131-20632-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/tests/insn-x86.c4
-rw-r--r--tools/perf/util/intel-pt-decoder/x86-opcode-map.txt2
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/tests/insn-x86.c b/tools/perf/tests/insn-x86.c
index 0e126a099874..5c49eec81349 100644
--- a/tools/perf/tests/insn-x86.c
+++ b/tools/perf/tests/insn-x86.c
@@ -17,11 +17,15 @@ struct test_data {
17 17
18struct test_data test_data_32[] = { 18struct test_data test_data_32[] = {
19#include "insn-x86-dat-32.c" 19#include "insn-x86-dat-32.c"
20 {{0x0f, 0x01, 0xee}, 3, 0, NULL, NULL, "0f 01 ee \trdpkru"},
21 {{0x0f, 0x01, 0xef}, 3, 0, NULL, NULL, "0f 01 ef \twrpkru"},
20 {{0}, 0, 0, NULL, NULL, NULL}, 22 {{0}, 0, 0, NULL, NULL, NULL},
21}; 23};
22 24
23struct test_data test_data_64[] = { 25struct test_data test_data_64[] = {
24#include "insn-x86-dat-64.c" 26#include "insn-x86-dat-64.c"
27 {{0x0f, 0x01, 0xee}, 3, 0, NULL, NULL, "0f 01 ee \trdpkru"},
28 {{0x0f, 0x01, 0xef}, 3, 0, NULL, NULL, "0f 01 ef \twrpkru"},
25 {{0}, 0, 0, NULL, NULL, NULL}, 29 {{0}, 0, 0, NULL, NULL, NULL},
26}; 30};
27 31
diff --git a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
index f4f0451a301e..5a9705ed9139 100644
--- a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
+++ b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
@@ -885,7 +885,7 @@ GrpTable: Grp7
8852: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) 8852: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B)
8863: LIDT Ms 8863: LIDT Ms
8874: SMSW Mw/Rv 8874: SMSW Mw/Rv
8885: 8885: rdpkru (110),(11B) | wrpkru (111),(11B)
8896: LMSW Ew 8896: LMSW Ew
8907: INVLPG Mb | SWAPGS (o64),(000),(11B) | RDTSCP (001),(11B) 8907: INVLPG Mb | SWAPGS (o64),(000),(11B) | RDTSCP (001),(11B)
891EndTable 891EndTable