Skip to content

kselftest/arm64: Vector length configuration tests

Mark Brown linux-arm-kernel linux-kselftest 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 1 replyIn review
  2. v44 patches 2 repliesSuperseded
  3. v34 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches8 repliesSuperseded
v13 patches11 repliesSuperseded

Changes in v5 from the cover letter

- Fix a potentially uninialized variable case.
- Clarify an error message.
- Add TODO.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4kselftest/arm64: Provide a helper binary and "library" for SVE RDVLtools/testing/selftests/arm64/fp/.gitignore tools/testing/selftests/arm64/fp/Makefile tools/testing/selftests/arm64/fp/rdvl-sve.c +2 more+38 -10 replies
2/4kselftest/arm64: Validate vector lengths are set in sve-probe-vlstools/testing/selftests/arm64/fp/Makefile tools/testing/selftests/arm64/fp/sve-probe-vls.c+6 -10 replies
3/4kselftest/arm64: Add tests for SVE vector configurationtools/testing/selftests/arm64/fp/.gitignore tools/testing/selftests/arm64/fp/Makefile tools/testing/selftests/arm64/fp/vec-syscfg.c+596 -10 replies
4/4kselftest/arm64: Add a TODO list for floating point teststools/testing/selftests/arm64/fp/TODO+4 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchDave Martin
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] kselftest/arm64: Vector length configuration tests

Currently we don't have full automated tests for the vector length configuation ABIs offered for SVE, we have a helper binary for setting the vector length which can be used for manual tests and we use the prctl() interface to enumerate the vector lengths but don't actually verify that the vector lengths enumerated were set.

This patch series provides a small helper which allows us to get the currently configured vector length using the RDVL instruction via either a library call or stdout of a process and then uses this to both add verification of enumerated vector lengths to our existing tests and also add a new test program which exercises both the prctl() and sysfs interfaces.

In preparation for the forthcomng support for the Scalable Matrix Extension (SME) [1] which introduces a new vector length managed via a very similar hardware interface the helper and new test program are parameterised with the goal of allowing reuse for SME.

[1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/scalable-matrix-extension-armv9-a-architecture

v5:
- Fix a potentially uninialized variable case.
- Clarify an error message.
- Add TODO.
v4:
- Fix fscanf() format string handling to properly confirm the newline.
- Pull fclose() out of stdio read helper.
- Change style of child monitoring loop.
v3:
- Add BTI landing pads to the asm helper functions.
- Clean up pipes used to talk to children.
- Remove another unneeded include.
- Make functions in the main executable static.
- Match the newline when parsing vector length from the child.
- Factor out the fscanf() and fclose() from parsing integers from file descriptors.
- getauxval() returns unsigned long.
v2:
- Tweak log message on failure in sve-probe-vls.
- Stylistic changes in vec-syscfg.
- Flush stdout before forking in vec-syscfg.
- Use EXIT_FAILURE.
- Use fdopen() to get child output.
- Replace a bunch of UNIX API usage with stdio.
- Add a TODO list.
- Verify that we're root before testing writes to /proc.

Mark Brown (4):
kselftest/arm64: Provide a helper binary and "library" for SVE RDVL kselftest/arm64: Validate vector lengths are set in sve-probe-vls kselftest/arm64: Add tests for SVE vector configuration kselftest/arm64: Add a TODO list for floating point tests

 tools/testing/selftests/arm64/fp/.gitignore   |   2 +
 tools/testing/selftests/arm64/fp/Makefile     |  11 +-
 tools/testing/selftests/arm64/fp/TODO         |   4 +
 tools/testing/selftests/arm64/fp/rdvl-sve.c   |  14 +
 tools/testing/selftests/arm64/fp/rdvl.S       |  10 +
 tools/testing/selftests/arm64/fp/rdvl.h       |   8 +
 .../selftests/arm64/fp/sve-probe-vls.c        |   5 +
 tools/testing/selftests/arm64/fp/vec-syscfg.c | 593 ++++++++++++++++++
 8 files changed, 644 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/arm64/fp/TODO
 create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c
 create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S
 create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h
 create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c

base-commit: ff1176468d368232b684f75e82563369208bc371

Signature · 1 line
2.20.1