3e360ef0 | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Corrupt P0 in the irritator when testing SSVE
When building for streaming SVE the irritator for SVE skips updates of both P0 and FFR. While FFR is skipped since it might not be pres
kselftest/arm64: Corrupt P0 in the irritator when testing SSVE
When building for streaming SVE the irritator for SVE skips updates of both P0 and FFR. While FFR is skipped since it might not be present there is no reason to skip corrupting P0 so switch to an instruction valid in streaming mode and move the ifdef.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-3-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
7dbd26d0 | 12-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Add FPMR coverage to fp-ptrace
Add coverage for FPMR to fp-ptrace. FPMR can be available independently of SVE and SME, if SME is supported then FPMR is cleared by entering and exiti
kselftest/arm64: Add FPMR coverage to fp-ptrace
Add coverage for FPMR to fp-ptrace. FPMR can be available independently of SVE and SME, if SME is supported then FPMR is cleared by entering and exiting streaming mode. As with other registers we generate random values to load into the register, we restrict these to bitfields which are always defined. We also leave bitfields where the valid values are affected by the set of supported FP8 formats zero to reduce complexity, it is unlikely that specific bitfields will be affected by ptrace issues.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241112-arm64-fp-ptrace-fpmr-v2-3-250b57c61254@kernel.org [catalin.marinas@arm.com: use REG_FPMR instead of FPMR] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
7e9c5b00 | 12-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Expand the set of ZA writes fp-ptrace does
Currently our test for implementable ZA writes is written in a bit of a convoluted fashion which excludes all changes where we clear SVCR.
kselftest/arm64: Expand the set of ZA writes fp-ptrace does
Currently our test for implementable ZA writes is written in a bit of a convoluted fashion which excludes all changes where we clear SVCR.SM even though we can actually support that since changing the vector length resets SVCR. Make the logic more direct, enabling us to actually run these cases.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241112-arm64-fp-ptrace-fpmr-v2-2-250b57c61254@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
b6bd50dd | 08-Nov-2024 |
Catalin Marinas <catalin.marinas@arm.com> |
kselftest/arm64: Fix printf() compiler warnings in the arm64 fp tests
Lots of incorrect length modifiers, missing arguments or conversion specifiers. Fix them.
Cc: Shuah Khan <skhan@linuxfoundation
kselftest/arm64: Fix printf() compiler warnings in the arm64 fp tests
Lots of incorrect length modifiers, missing arguments or conversion specifiers. Fix them.
Cc: Shuah Khan <skhan@linuxfoundation.org> Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241108134920.1233992-2-catalin.marinas@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
ae465d9c | 08-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Fix build with stricter assemblers
While some assemblers (including the LLVM assembler I mostly use) will happily accept SMSTART as an instruction by default others, specifically ga
kselftest/arm64: Fix build with stricter assemblers
While some assemblers (including the LLVM assembler I mostly use) will happily accept SMSTART as an instruction by default others, specifically gas, require that any architecture extensions be explicitly enabled. The assembler SME test programs use manually encoded helpers for the new instructions but no SMSTART helper is defined, only SM and ZA specific variants. Unfortunately the irritators that were just added use plain SMSTART so on stricter assemblers these fail to build:
za-test.S:160: Error: selected processor does not support `smstart'
Switch to using SMSTART ZA via the manually encoded smstart_za macro we already have defined.
Fixes: d65f27d240bb ("kselftest/arm64: Implement irritators for ZA and ZT") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241108-arm64-selftest-asm-error-v1-1-7ce27b42a677@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
ead1c35c | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Test signal handler state modification in fp-stress
Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are de
kselftest/arm64: Test signal handler state modification in fp-stress
Currently in fp-stress we test signal delivery to the test threads by sending SIGUSR2 which simply counts how many signals are delivered. The test programs now also all have a SIGUSR1 handler which for the threads doing userspace testing additionally modifies the floating point register state in the signal handler, verifying that when we return the saved register state is restored from the signal context as expected. Switch over to triggering that to validate that we are restoring as expected.
Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-6-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
7368debf | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test
The other stress test programs provide a SIGUSR1 handler which modifies the live register state in order to validate that
kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test
The other stress test programs provide a SIGUSR1 handler which modifies the live register state in order to validate that signal context is being restored during signal return. While we can't usefully do this when testing kernel mode FP usage provide a handler for SIGUSR1 which just counts the number of signals like we do for SIGUSR2, allowing fp-stress to treat all the test programs uniformly.
Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-5-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
d65f27d2 | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Implement irritators for ZA and ZT
Currently we don't use the irritator signal in our floating point stress tests so when we added ZA and ZT stress tests we didn't actually bother i
kselftest/arm64: Implement irritators for ZA and ZT
Currently we don't use the irritator signal in our floating point stress tests so when we added ZA and ZT stress tests we didn't actually bother implementing any actual action in the handlers, we just counted the signal deliveries. In preparation for using the irritators let's implement them, just trivially SMSTOP and SMSTART to reset all bits in the register to 0.
Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-4-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
ffca567f | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Remove unused ADRs from irritator handlers
The irritator handlers for the fp-stress test programs all use ADR to load an address into x0 which is then not referenced. Remove these A
kselftest/arm64: Remove unused ADRs from irritator handlers
The irritator handlers for the fp-stress test programs all use ADR to load an address into x0 which is then not referenced. Remove these ADRs as they just cause confusion.
Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-2-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
94de486e | 07-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Correct misleading comments on fp-stress irritators
The comments in the handlers for the irritator signal in the test threads for fp-stress suggest that the irritator will corrupt t
kselftest/arm64: Correct misleading comments on fp-stress irritators
The comments in the handlers for the irritator signal in the test threads for fp-stress suggest that the irritator will corrupt the register state observed by the main thread but this is not the case, instead the FPSIMD and SVE irritators (which are the only ones that are implemented) modify the current register state which is expected to be overwritten on return from the handler by the saved register state. Update the comment to reflect what the handler is actually doing.
Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-1-c4b9622e36ee@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
161e9925 | 30-Oct-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Poll less often while waiting for fp-stress children
While fp-stress is waiting for children to start it doesn't send any signals to them so there is no need for it to have as short
kselftest/arm64: Poll less often while waiting for fp-stress children
While fp-stress is waiting for children to start it doesn't send any signals to them so there is no need for it to have as short an epoll() timeout as it does when the children are all running. We do still want to have some timeout so that we can log diagnostics about missing children but this can be relatively large. On emulated platforms the overhead of running the supervisor process is quite high, especially during the process of execing the test binaries.
Implement a longer epoll() timeout during the setup phase, using a 5s timeout while waiting for children and switching to the signal raise interval when all the children are started and we start sending signals.
Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241030-arm64-fp-stress-interval-v2-2-bd3cef48c22c@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
a3590d71 | 30-Oct-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Increase frequency of signal delivery in fp-stress
Currently we only deliver signals to the processes being tested about once a second, meaning that the signal code paths are subjec
kselftest/arm64: Increase frequency of signal delivery in fp-stress
Currently we only deliver signals to the processes being tested about once a second, meaning that the signal code paths are subject to relatively little stress. Increase this frequency substantially to 25ms intervals, along with some minor refactoring to make this more readily tuneable and maintain the 1s logging interval. This interval was chosen based on some experimentation with emulated platforms to avoid causing so much extra load that the test starts to run into the 45s limit for selftests or generally completely disconnect the timeout numbers from the
We could increase this if we moved the signal generation out of the main supervisor thread, though we should also consider that he percentage of time that we spend interacting with the floating point state is also a consideration.
Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241030-arm64-fp-stress-interval-v2-1-bd3cef48c22c@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
dca93d29 | 23-Oct-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Log fp-stress child startup errors to stdout
Currently if we encounter an error between fork() and exec() of a child process we log the error to stderr. This means that the errors d
kselftest/arm64: Log fp-stress child startup errors to stdout
Currently if we encounter an error between fork() and exec() of a child process we log the error to stderr. This means that the errors don't get annotated with the child information which makes diagnostics harder and means that if we miss the exit signal from the child we can deadlock waiting for output from the child. Improve robustness and output quality by logging to stdout instead.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241023-arm64-fp-stress-exec-fail-v1-1-ee3c62932c15@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
963c5d49 | 13-Jun-2024 |
Colin Ian King <colin.i.king@gmail.com> |
kselftest/arm64: Fix a couple of spelling mistakes
There are two spelling mistakes in some error messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Mark Brown <
kselftest/arm64: Fix a couple of spelling mistakes
There are two spelling mistakes in some error messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240613073429.1797451-1-colin.i.king@gmail.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
9a802ddb | 19-Dec-2023 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Don't probe the current VL for unsupported vector types
The vec-syscfg selftest verifies that setting the VL of the currently tested vector type does not disrupt the VL of the other
kselftest/arm64: Don't probe the current VL for unsupported vector types
The vec-syscfg selftest verifies that setting the VL of the currently tested vector type does not disrupt the VL of the other vector type. To do this it records the current vector length for each type but neglects to guard this with a check for that vector type actually being supported. Add one, using a helper function which we also update all the other instances of this pattern.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20231218-kselftest-arm64-vec-syscfg-rdvl-v1-1-0ac22d47e81f@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
0aeead9b | 20-Jul-2023 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Validate that changing one VL type does not affect another
On a system with both SVE and SME when we change one of the VLs this should not result in a change in the other VL. Add a
kselftest/arm64: Validate that changing one VL type does not affect another
On a system with both SVE and SME when we change one of the VLs this should not result in a change in the other VL. Add a check that this is in fact the case to vec-syscfg.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230720-arm64-fix-sve-sme-vl-change-v2-3-8eea06b82d57@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|