]> git.baikalelectronics.ru Git - kernel.git/commit
x86/insn: Add AMX instructions to the x86 instruction decoder
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 2 Dec 2021 09:50:25 +0000 (11:50 +0200)
committerBorislav Petkov <bp@suse.de>
Sun, 23 Jan 2022 19:37:46 +0000 (20:37 +0100)
commit92ee8b4eca0299d11e6fc95c6884e8c08fc08a9b
treeb74521da67d1629fafe08482bfe7aed312088ffa
parent497659087e8987ca33d5eea71b618ba910370a3c
x86/insn: Add AMX instructions to the x86 instruction decoder

The x86 instruction decoder is used for both kernel instructions and
user space instructions (e.g. uprobes, perf tools Intel PT), so it is
good to update it with new instructions.

Add AMX instructions to the x86 instruction decoder.

Reference:
Intel Architecture Instruction Set Extensions and Future Features
Programming Reference
May 2021
Document Number: 319433-044

Example using perf tools' x86 instruction decoder test:

  $ INSN='ldtilecfg\|sttilecfg\|tdpbf16ps\|tdpbssd\|'
  $ INSN+='tdpbsud\|tdpbusd\|'tdpbuud\|tileloadd\|'
  $ INSN+='tileloaddt1\|tilerelease\|tilestored\|tilezero'
  $ perf test -v "x86 instruction decoder" |& grep -i $INSN
  Decoded ok: c4 e2 78 49 04 c8     ldtilecfg (%rax,%rcx,8)
  Decoded ok: c4 c2 78 49 04 c8     ldtilecfg (%r8,%rcx,8)
  Decoded ok: c4 e2 79 49 04 c8     sttilecfg (%rax,%rcx,8)
  Decoded ok: c4 c2 79 49 04 c8     sttilecfg (%r8,%rcx,8)
  Decoded ok: c4 e2 7a 5c d1        tdpbf16ps %tmm0,%tmm1,%tmm2
  Decoded ok: c4 e2 7b 5e d1        tdpbssd %tmm0,%tmm1,%tmm2
  Decoded ok: c4 e2 7a 5e d1        tdpbsud %tmm0,%tmm1,%tmm2
  Decoded ok: c4 e2 79 5e d1        tdpbusd %tmm0,%tmm1,%tmm2
  Decoded ok: c4 e2 78 5e d1        tdpbuud %tmm0,%tmm1,%tmm2
  Decoded ok: c4 e2 7b 4b 0c c8     tileloadd (%rax,%rcx,8),%tmm1
  Decoded ok: c4 c2 7b 4b 14 c8     tileloadd (%r8,%rcx,8),%tmm2
  Decoded ok: c4 e2 79 4b 0c c8     tileloaddt1 (%rax,%rcx,8),%tmm1
  Decoded ok: c4 c2 79 4b 14 c8     tileloaddt1 (%r8,%rcx,8),%tmm2
  Decoded ok: c4 e2 78 49 c0        tilerelease
  Decoded ok: c4 e2 7a 4b 0c c8     tilestored %tmm1,(%rax,%rcx,8)
  Decoded ok: c4 c2 7a 4b 14 c8     tilestored %tmm2,(%r8,%rcx,8)
  Decoded ok: c4 e2 7b 49 c0        tilezero %tmm0
  Decoded ok: c4 e2 7b 49 f8        tilezero %tmm7

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20211202095029.2165714-3-adrian.hunter@intel.com
arch/x86/lib/x86-opcode-map.txt
tools/arch/x86/lib/x86-opcode-map.txt