Skip to content

Commit 9e8ebfe

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Specify SVE data when testing VL set in sve-ptrace
Since f916dd3 ("arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state") we reject attempts to write to the streaming mode regset even if there is no register data supplied, causing the tests for setting vector lengths and setting SVE_VL_INHERIT in sve-ptrace to spuriously fail. Set the flag to avoid the issue, we still support not supplying register data. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/20250609-kselftest-arm64-ssve-fixups-v2-3-998fcfa6f240@kernel.org Signed-off-by: Catalin Marinas <[email protected]>
1 parent 94ab150 commit 9e8ebfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/arm64/fp/sve-ptrace.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static void ptrace_set_get_inherit(pid_t child, const struct vec_type *type)
170170
memset(&sve, 0, sizeof(sve));
171171
sve.size = sizeof(sve);
172172
sve.vl = sve_vl_from_vq(SVE_VQ_MIN);
173-
sve.flags = SVE_PT_VL_INHERIT;
173+
sve.flags = SVE_PT_VL_INHERIT | SVE_PT_REGS_SVE;
174174
ret = set_sve(child, type, &sve);
175175
if (ret != 0) {
176176
ksft_test_result_fail("Failed to set %s SVE_PT_VL_INHERIT\n",
@@ -235,6 +235,7 @@ static void ptrace_set_get_vl(pid_t child, const struct vec_type *type,
235235
/* Set the VL by doing a set with no register payload */
236236
memset(&sve, 0, sizeof(sve));
237237
sve.size = sizeof(sve);
238+
sve.flags = SVE_PT_REGS_SVE;
238239
sve.vl = vl;
239240
ret = set_sve(child, type, &sve);
240241
if (ret != 0) {

0 commit comments

Comments
 (0)