Commit a0245b42 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas
Browse files

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: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent eb9df6d6
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1071,7 +1071,7 @@ static bool sve_write_supported(struct test_config *config)

static bool sve_write_fpsimd_supported(struct test_config *config)
{
	if (!sve_supported())
	if (!sve_supported() && !sme_supported())
		return false;

	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)
	vl = vl_expected(config);
	vq = __sve_vq_from_vl(vl);

	if (!vl)
		return;

	iov.iov_len = SVE_PT_SIZE(vq, SVE_PT_REGS_FPSIMD);
	iov.iov_base = malloc(iov.iov_len);
	if (!iov.iov_base) {