linux/tools/testing/selftests/arm64/fp
Will Deacon 712f4ee70a Merge branch 'for-next/selftests' into for-next/core
* for-next/selftests:
  kselftest/arm64: Add lsfe to the hwcaps test
  kselftest/arm64: Check that unsupported regsets fail in sve-ptrace
  kselftest/arm64: Verify that we reject out of bounds VLs in sve-ptrace
  kselftest/arm64/gcs/basic-gcs: Respect parent directory CFLAGS
  selftests/arm64: Fix grammatical error in string literals
  kselftest/arm64: Add parentheses around sizeof for clarity
  kselftest/arm64: Supress warning and improve readability
  kselftest/arm64: Remove extra blank line
  kselftest/arm64/gcs: Use nolibc's getauxval()
  kselftest/arm64/gcs: Correctly check return value when disabling GCS
  selftests: arm64: Fix -Waddress warning in tpidr2 test
  kselftest/arm64: Log error codes in sve-ptrace
  selftests: arm64: Check fread return value in exec_target
2025-09-24 16:34:56 +01:00
..
.gitignore
Makefile
README
TODO
asm-offsets.h
asm-utils.S
assembler.h kselftest/arm64: Enable GCS for the FP stress tests 2024-10-04 12:04:46 +01:00
fp-pidbench.S
fp-ptrace-asm.S kselftest/arm64: Add FPMR coverage to fp-ptrace 2024-11-12 13:28:49 +00:00
fp-ptrace.c Merge branch 'for-next/selftests' into for-next/core 2025-09-24 16:34:56 +01:00
fp-ptrace.h kselftest/arm64: Add FPMR coverage to fp-ptrace 2024-11-12 13:28:49 +00:00
fp-stress.c selftests/arm64: Fix grammatical error in string literals 2025-09-08 16:17:13 +01:00
fpsimd-stress
fpsimd-test.S Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next/tlb', 'for-next/misc', 'for-next/mte', 'for-next/sysreg', 'for-next/stacktrace', 'for-next/hwcap3', 'for-next/kselftest', 'for-next/crc32', 'for-next/guest-cca', 'for-next/haft' and 'for-next/scs', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-11-14 12:07:16 +00:00
kernel-test.c selftests/arm64: Fix grammatical error in string literals 2025-09-08 16:17:13 +01:00
rdvl-sme.c
rdvl-sve.c
rdvl.S
rdvl.h
sme-inst.h kselftest/arm64: Add FPMR coverage to fp-ptrace 2024-11-12 13:28:49 +00:00
ssve-stress
sve-probe-vls.c
sve-ptrace.c kselftest/arm64: Check that unsupported regsets fail in sve-ptrace 2025-09-18 12:53:38 +01:00
sve-stress
sve-test.S Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next/tlb', 'for-next/misc', 'for-next/mte', 'for-next/sysreg', 'for-next/stacktrace', 'for-next/hwcap3', 'for-next/kselftest', 'for-next/crc32', 'for-next/guest-cca', 'for-next/haft' and 'for-next/scs', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-11-14 12:07:16 +00:00
vec-syscfg.c kselftest/arm64: Remove extra blank line 2025-09-08 16:01:21 +01:00
vlset.c
za-fork-asm.S
za-fork.c
za-ptrace.c kselftest/arm64: Fix printf() compiler warnings in the arm64 fp tests 2024-11-11 22:44:06 +00:00
za-stress
za-test.S Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next/tlb', 'for-next/misc', 'for-next/mte', 'for-next/sysreg', 'for-next/stacktrace', 'for-next/hwcap3', 'for-next/kselftest', 'for-next/crc32', 'for-next/guest-cca', 'for-next/haft' and 'for-next/scs', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-11-14 12:07:16 +00:00
zt-ptrace.c kselftest/arm64: Remove extra blank line 2025-09-08 16:01:21 +01:00
zt-test.S Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next/tlb', 'for-next/misc', 'for-next/mte', 'for-next/sysreg', 'for-next/stacktrace', 'for-next/hwcap3', 'for-next/kselftest', 'for-next/crc32', 'for-next/guest-cca', 'for-next/haft' and 'for-next/scs', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-11-14 12:07:16 +00:00

README

This directory contains a mix of tests integrated with kselftest and
standalone stress tests.

kselftest tests
===============

sve-probe-vls - Checks the SVE vector length enumeration interface
sve-ptrace - Checks the SVE ptrace interface

Running the non-kselftest tests
===============================

sve-stress performs an SVE context switch stress test, as described
below.

(The fpsimd-stress test works the same way; just substitute "fpsimd" for
"sve" in the following commands.)


The test runs until killed by the user.

If no context switch error was detected, you will see output such as
the following:

$ ./sve-stress
(wait for some time)
^C
Vector length:        512 bits
PID:    1573
Terminated by signal 15, no error, iterations=9467, signals=1014
Vector length:  512 bits
PID:    1575
Terminated by signal 15, no error, iterations=9448, signals=1028
Vector length:  512 bits
PID:    1577
Terminated by signal 15, no error, iterations=9436, signals=1039
Vector length:  512 bits
PID:    1579
Terminated by signal 15, no error, iterations=9421, signals=1039
Vector length:  512 bits
PID:    1581
Terminated by signal 15, no error, iterations=9403, signals=1039
Vector length:  512 bits
PID:    1583
Terminated by signal 15, no error, iterations=9385, signals=1036
Vector length:  512 bits
PID:    1585
Terminated by signal 15, no error, iterations=9376, signals=1039
Vector length:  512 bits
PID:    1587
Terminated by signal 15, no error, iterations=9361, signals=1039
Vector length:  512 bits
PID:    1589
Terminated by signal 15, no error, iterations=9350, signals=1039


If an error was detected, details of the mismatch will be printed
instead of "no error".

Ideally, the test should be allowed to run for many minutes or hours
to maximise test coverage.


KVM stress testing
==================

To try to reproduce the bugs that we have been observing, sve-stress
should be run in parallel in two KVM guests, while simultaneously
running on the host.

1) Start 2 guests, using the following command for each:

$ lkvm run --console=virtio -pconsole=hvc0 --sve Image

(Depending on the hardware GIC implementation, you may also need
--irqchip=gicv3.  New kvmtool defaults to that if appropriate, but I
can't remember whether my branch is new enough for that.  Try without
the option first.)

Kvmtool occupies the terminal until you kill it (Ctrl+A x),
or until the guest terminates.  It is therefore recommended to run
each instance in separate terminal (use screen or ssh etc.)  This
allows multiple guests to be run in parallel while running other
commands on the host.

Within the guest, the host filesystem is accessible, mounted on /host.

2) Run the sve-stress on *each* guest with the Vector-Length set to 32:
guest$ ./vlset --inherit 32 ./sve-stress

3) Run the sve-stress on the host with the maximum Vector-Length:
host$ ./vlset --inherit --max ./sve-stress


Again, the test should be allowed to run for many minutes or hours to
maximise test coverage.

If no error is detected, you will see output from each sve-stress
instance similar to that illustrated above; otherwise details of the
observed mismatches will be printed.