From 0449e0c6d50aa3802e755b326e5220a7bde20fb9 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Wed, 25 Sep 2024 12:40:14 -0400 Subject: [PATCH] Disable AVX512 IFMA usage on Windows --- crypto/fipsmodule/cpucap/internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/fipsmodule/cpucap/internal.h b/crypto/fipsmodule/cpucap/internal.h index 12e93ebcf8..bb7bce4d3f 100644 --- a/crypto/fipsmodule/cpucap/internal.h +++ b/crypto/fipsmodule/cpucap/internal.h @@ -140,8 +140,12 @@ OPENSSL_INLINE int CRYPTO_is_VPCLMULQDQ_capable(void) { // 1100_0000_0010_0011_0000_0000_0000_0000 #define CPU_CAP_AVX512IFMA_BITFLAGS 0xC0230000 OPENSSL_INLINE int CRYPTO_is_AVX512IFMA_capable(void) { +#if defined(OPENSSL_WINDOWS) + return 0; +#else return (OPENSSL_ia32cap_get()[2] & CPU_CAP_AVX512IFMA_BITFLAGS) == CPU_CAP_AVX512IFMA_BITFLAGS; +#endif } OPENSSL_INLINE int CRYPTO_is_VBMI2_capable(void) {