From 24a8464fc0cf42202a8f0b14877067f29a149285 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 18 Aug 2026 22:09:39 +0200 Subject: [PATCH] Require AVX512BW in addition to AVX512F for AVX-512 GFNI detection --- raid/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raid/cpu.h b/raid/cpu.h index 14aaed93..aeab0c28 100644 --- a/raid/cpu.h +++ b/raid/cpu.h @@ -231,7 +231,7 @@ static inline int raid_cpu_has_avx512bw(void) static inline int raid_cpu_has_avx512gfni(void) { uint32_t leaf_1_ecx = 1 << 27; /* XSAVE/XGETBV */ - uint32_t leaf_7_ebx = 1 << 16; /* AVX512F (Foundation) */ + uint32_t leaf_7_ebx = (1 << 16) | (1 << 30); /* AVX512F and AVX512BW */ uint32_t leaf_7_ecx = 1 << 8; /* GFNI */ uint32_t xcr0 = (3 << 1) | (7 << 5); /* OS saves XMM, YMM and ZMM registers */