kselftest/arm64: Verify SME only ABI in syscall-abi
authorMark Brown <broonie@kernel.org>
Tue, 27 Dec 2022 13:06:37 +0000 (13:06 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 12 Jan 2023 16:20:31 +0000 (16:20 +0000)
commit024e4a155874dcd3c3473fb26ff4f491c746b4d3
tree2d779280dd29d0b56515e0d90c4b124ee20af928
parentfae491e52cc2b48097bd93fceb687ccbacd263c4
kselftest/arm64: Verify SME only ABI in syscall-abi

Currently syscall-abi only covers SME in the case where the system supports
SVE however it is architecturally valid to support SME without SVE. Update
the program to cover this case, this requires adjustments in the code to
check for SVCR.SM being set when deciding if we're handling the FPSIMD or
SVE registers and the addition of new test cases for the SME only case.

Note that in the SME only case we should not save the SVE registers after a
syscall since even if we were in streaming mode and therefore set them the
syscall should have exited streaming mode, we check that we have done so by
looking at SVCR.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-3-4fabfbd62087@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/abi/syscall-abi-asm.S
tools/testing/selftests/arm64/abi/syscall-abi.c