crypto: aesni - Add scatter/gather avx stubs, and use them in C
authorDave Watson <davejwatson@fb.com>
Mon, 10 Dec 2018 19:59:59 +0000 (19:59 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 23 Dec 2018 03:52:43 +0000 (11:52 +0800)
commit603f8c3b0dbbe21fabb7e005f57883b21aaadd82
treeb65b9ea71cfb5d33331e6ce2b128d83fc4e16b6c
parente044d5056396029cc12ed5354aa2a073b747195a
crypto: aesni - Add scatter/gather avx stubs, and use them in C

Add the appropriate scatter/gather stubs to the avx asm.
In the C code, we can now always use crypt_by_sg, since both
sse and asm code now support scatter/gather.

Introduce a new struct, aesni_gcm_tfm, that is initialized on
startup to point to either the SSE, AVX, or AVX2 versions of the
four necessary encryption/decryption routines.

GENX_OPTSIZE is still checked at the start of crypt_by_sg.  The
total size of the data is checked, since the additional overhead
is in the init function, calculating additional HashKeys.

Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aesni-intel_avx-x86_64.S
arch/x86/crypto/aesni-intel_glue.c