[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241209105237.10498-1-o451686892@gmail.com>
Date: Mon, 9 Dec 2024 18:52:37 +0800
From: Weizhao Ouyang <o451686892@...il.com>
To: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Weizhao Ouyang <o451686892@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] kselftest/arm64: abi: fix SVCR detection
When using svcr_in to check ZA and Streaming Mode, we should make sure
that the value in x2 is correct, otherwise it may trigger an Illegal
instruction if FEAT_SVE and !FEAT_SME.
Fixes: 43e3f85523e4 ("kselftest/arm64: Add SME support to syscall ABI test")
Signed-off-by: Weizhao Ouyang <o451686892@...il.com>
---
tools/testing/selftests/arm64/abi/syscall-abi-asm.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S
index df3230fdac39..98cde4f37abf 100644
--- a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S
+++ b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S
@@ -81,9 +81,9 @@ do_syscall:
stp x27, x28, [sp, #96]
// Set SVCR if we're doing SME
- cbz x1, 1f
adrp x2, svcr_in
ldr x2, [x2, :lo12:svcr_in]
+ cbz x1, 1f
msr S3_3_C4_C2_2, x2
1:
--
2.45.2
Powered by blists - more mailing lists