x86/insn: Add Key Locker instructions to the opcode map
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 2 May 2024 10:58:44 +0000 (13:58 +0300)
committerIngo Molnar <mingo@kernel.org>
Thu, 2 May 2024 11:13:41 +0000 (13:13 +0200)
commita5dd673ab7d269e4a5b6565fc2b5c6295a079605
tree9620e492265985836d8355e0b8d5b6ff37eb4f59
parentad112b3a759cefc245695f7e612f17e6f38d2cc1
x86/insn: Add Key Locker instructions to the opcode map

The x86 instruction decoder needs to know these new instructions that
are going to be used in the crypto library as well as the x86 core
code. Add the following:

LOADIWKEY:
Load a CPU-internal wrapping key.

ENCODEKEY128:
Wrap a 128-bit AES key to a key handle.

ENCODEKEY256:
Wrap a 256-bit AES key to a key handle.

AESENC128KL:
Encrypt a 128-bit block of data using a 128-bit AES key
indicated by a key handle.

AESENC256KL:
Encrypt a 128-bit block of data using a 256-bit AES key
indicated by a key handle.

AESDEC128KL:
Decrypt a 128-bit block of data using a 128-bit AES key
indicated by a key handle.

AESDEC256KL:
Decrypt a 128-bit block of data using a 256-bit AES key
indicated by a key handle.

AESENCWIDE128KL:
Encrypt 8 128-bit blocks of data using a 128-bit AES key
indicated by a key handle.

AESENCWIDE256KL:
Encrypt 8 128-bit blocks of data using a 256-bit AES key
indicated by a key handle.

AESDECWIDE128KL:
Decrypt 8 128-bit blocks of data using a 128-bit AES key
indicated by a key handle.

AESDECWIDE256KL:
Decrypt 8 128-bit blocks of data using a 256-bit AES key
indicated by a key handle.

The detail can be found in Intel Software Developer Manual.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/20240502105853.5338-2-adrian.hunter@intel.com
arch/x86/lib/x86-opcode-map.txt
tools/arch/x86/lib/x86-opcode-map.txt