Skip to content

Commit a0245b4

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Cover disabling streaming mode without SVE in fp-ptrace
On a system which support SME but not SVE we can now disable streaming mode via ptrace by writing FPSIMD formatted data through NT_ARM_SVE with a VL of 0. Extend fp-ptrace to cover rather than skip these cases, relax the check for SVE writes of FPSIMD format data to not skip if SME is supported and accept 0 as the VL when performing the ptrace write. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent eb9df6d commit a0245b4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ static bool sve_write_supported(struct test_config *config)
10711071

10721072
static bool sve_write_fpsimd_supported(struct test_config *config)
10731073
{
1074-
if (!sve_supported())
1074+
if (!sve_supported() && !sme_supported())
10751075
return false;
10761076

10771077
if ((config->svcr_in & SVCR_ZA) != (config->svcr_expected & SVCR_ZA))
@@ -1231,9 +1231,6 @@ static void sve_write_fpsimd(pid_t child, struct test_config *config)
12311231
vl = vl_expected(config);
12321232
vq = __sve_vq_from_vl(vl);
12331233

1234-
if (!vl)
1235-
return;
1236-
12371234
iov.iov_len = SVE_PT_SIZE(vq, SVE_PT_REGS_FPSIMD);
12381235
iov.iov_base = malloc(iov.iov_len);
12391236
if (!iov.iov_base) {

0 commit comments

Comments
 (0)