From cb71dee9a64ee3e18ce4002d9ca54d97d3d5a106 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 20 Oct 2017 19:00:50 +0200 Subject: crypto/avx: make sure we can actually use ymm registers Signed-off-by: Jason A. Donenfeld --- src/crypto/curve25519.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypto/curve25519.c') diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c index f236cf5..a53841d 100644 --- a/src/crypto/curve25519.c +++ b/src/crypto/curve25519.c @@ -33,7 +33,7 @@ static const u8 null_point[CURVE25519_POINT_SIZE] = { 0 }; static bool curve25519_use_avx __read_mostly = false; void curve25519_fpu_init(void) { - curve25519_use_avx = boot_cpu_has(X86_FEATURE_AVX); + curve25519_use_avx = boot_cpu_has(X86_FEATURE_AVX) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL); } typedef u64 fe[10]; -- cgit v1.2.3