From cd803b3e670663bbea8cb04a194320e90442ad80 Mon Sep 17 00:00:00 2001 From: Byeonguk Jeong Date: Thu, 12 Feb 2026 22:23:42 +0900 Subject: [PATCH] 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 --- src/util/arch/arm/cpuid_inline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3