aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/chacha20poly1305.c
diff options
context:
space:
mode:
authorSamuel Neves <sneves@dei.uc.pt>2017-12-01 21:21:39 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2017-12-03 15:16:10 +0100
commit3004f6b28556b2ab37cfd60ac12f6d495169705a (patch)
tree882033dfee8d8717f182d947e61d506428058437 /src/crypto/chacha20poly1305.c
parenttools: no need to put this on the stack (diff)
downloadwireguard-monolithic-historical-3004f6b28556b2ab37cfd60ac12f6d495169705a.tar.xz
wireguard-monolithic-historical-3004f6b28556b2ab37cfd60ac12f6d495169705a.zip
poly1305: update x86-64 kernel to AVX512F only
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
Diffstat (limited to 'src/crypto/chacha20poly1305.c')
-rw-r--r--src/crypto/chacha20poly1305.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/crypto/chacha20poly1305.c b/src/crypto/chacha20poly1305.c
index e795d2f..2fa94c7 100644
--- a/src/crypto/chacha20poly1305.c
+++ b/src/crypto/chacha20poly1305.c
@@ -74,12 +74,7 @@ void __init chacha20poly1305_fpu_init(void)
chacha20poly1305_use_avx = boot_cpu_has(X86_FEATURE_AVX) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
chacha20poly1305_use_avx2 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
#ifndef COMPAT_CANNOT_USE_AVX512
- /* ChaCha20 only needs AVX512F, but Poly1305 needs F+VL+BW. Since
- * there's no hardware that actually supports one and not the other,
- * we keep this as one flag. But should bizarre hardware ever be
- * produced, we'll want to separate these out.
- */
- chacha20poly1305_use_avx512 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) && boot_cpu_has(X86_FEATURE_AVX512VL) && boot_cpu_has(X86_FEATURE_AVX512BW) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | XFEATURE_MASK_ZMM_Hi256, NULL);
+ chacha20poly1305_use_avx512 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | XFEATURE_MASK_ZMM_Hi256, NULL);
#endif
}
#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)