From: Byeonguk Jeong Date: Thu, 12 Feb 2026 13:23:42 +0000 (+0900) Subject: sve2: Test SVE2 availability with both HWCAP_SVE and HWCAP2_SVE2 (#363) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd803b3e670663bbea8cb04a194320e90442ad80;p=thirdparty%2Fvectorscan.git sve2: Test SVE2 availability with both HWCAP_SVE and HWCAP2_SVE2 (#363) hwcaps accidentally returns HWCAP2_SVE2 when only SME features are supported, not SVE. Note that this bug has been fixed on kernel mainline 6.14. For more informations about this, see below: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v6-1-7578da51fc3d@kernel.org --- diff --git a/src/util/arch/arm/cpuid_inline.h b/src/util/arch/arm/cpuid_inline.h index f8a59af3..feb1825a 100644 --- a/src/util/arch/arm/cpuid_inline.h +++ b/src/util/arch/arm/cpuid_inline.h @@ -60,7 +60,7 @@ int check_sve(void) { static inline int check_sve2(void) { unsigned long hwcap2 = getauxval(AT_HWCAP2); - if (hwcap2 & HWCAP2_SVE2) { + if (check_sve() && (hwcap2 & HWCAP2_SVE2)) { return 1; } return 0;