mbox series

[v2,0/3] kselftest/arm64: fp-ptrace enhancements

Message ID 20241112-arm64-fp-ptrace-fpmr-v2-0-250b57c61254@kernel.org
Headers show
Series kselftest/arm64: fp-ptrace enhancements | expand

Message

Mark Brown Nov. 12, 2024, 1:08 p.m. UTC
This series contains a bit of a grab bag of improvements to the floating
point tests, mainly fp-ptrace.  Globally over all the tests we start
using defines from the generated sysregs (following the example of the
KVM selftests) for SVCR, stop being quite so wasteful with registers
when calling into the assembler code then expand the coverage of both ZA
writes and FPMR (which was not there since fp-ptrace and the 2023 dpISA
extensions were on the list at the same time).

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Changes in v2:
- Drop attempt to reference sysreg-defs.h due to build issues, just
  import the defines directly into fp-ptrace.  We can revisit later.
- Link to v1: https://lore.kernel.org/r/20241107-arm64-fp-ptrace-fpmr-v1-0-3e5e0b6e3be9@kernel.org

---
Mark Brown (3):
      kselftets/arm64: Use flag bits for features in fp-ptrace assembler code
      kselftest/arm64: Expand the set of ZA writes fp-ptrace does
      kselftest/arm64: Add FPMR coverage to fp-ptrace

 tools/testing/selftests/arm64/fp/fp-ptrace-asm.S |  41 ++++--
 tools/testing/selftests/arm64/fp/fp-ptrace.c     | 161 +++++++++++++++++++++--
 tools/testing/selftests/arm64/fp/fp-ptrace.h     |  12 ++
 tools/testing/selftests/arm64/fp/sme-inst.h      |   2 +
 4 files changed, 188 insertions(+), 28 deletions(-)
---
base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354
change-id: 20241105-arm64-fp-ptrace-fpmr-ff061facd3da

Best regards,

Comments

Catalin Marinas Nov. 12, 2024, 1:26 p.m. UTC | #1
On Tue, Nov 12, 2024 at 01:08:16PM +0000, Mark Brown wrote:
> +	// This has to come after we set PSTATE.SM
> +check_fpmr_in:
> +	tbz	x0, #HAVE_FPMR_SHIFT, wait_for_writes
> +	adrp	x7, fpmr_in
> +	ldr	x7, [x7, :lo12:fpmr_in]
> +	msr	FPMR, x7

Did this build for you? I may not have a new enough assembler.

fp-ptrace-asm.S:149:6: error: expected writable system register or pstate
 msr FPMR, x7

I changed it to REG_FPMR locally.