SSVE selftests failing unexpectedly

Will Deacon will at kernel.org
Wed Jun 28 08:56:35 PDT 2023


Hi Mark,

While debugging the SME issue reported in CI, I noticed that the
streaming SVE tests are failing on the fastmodel because of an
unexpected SIGILL. For example:

will:arm64/signal$ ./ssve_za_regs
# Streaming SVE registers :: Check that we get the right Streaming SVE registers reported
Registered handlers for all signals.
Detected MINSTKSIGSZ:4720
Required Features: [ SME ] supported
Incompatible Features: [] absent
Testcase initialized.
Testing VL 64
-- RX UNEXPECTED SIGNAL: 4
==>> completed. FAIL(0)

The signal is injected because we get an SME trap due to an fpsimd, sve
or sve2 instruction being used in streaming mode (ESR is 0x76000001).

I did a bit of digging and it looks like this is my libc using a vector
DUP instruction in memset:

#0  __memset_generic () at ../sysdeps/aarch64/memset.S:37
#1  0x0000aaaaaaaa1170 in get_current_context (dest_sz=131072,
    dest_uc=0xaaaaaeab6ba0 <context>, td=0xaaaaaaab50f0 <tde>)
    at ./test_signals_utils.h:69
#2  do_one_sme_vl (si=<optimized out>, uc=<optimized out>, vl=64,
    td=0xaaaaaaab50f0 <tde>) at testcases/ssve_za_regs.c:90
#3  sme_regs (td=0xaaaaaaab50f0 <tde>, si=<optimized out>, uc=<optimized out>)
    at testcases/ssve_za_regs.c:145
#4  0x0000aaaaaaaa0ed0 in main (argc=<optimized out>, argv=<optimized out>)
    at test_signals.c:21

Dump of assembler code for function __memset_generic:
=> 0x0000fffff7edfb00 <+0>:	dup	v0.16b, w1

The easy option would be to require FA64 for these tests, but I guess it
would be better to exit streaming mode.

Please can you have a look?

Thanks,

Will



More information about the linux-arm-kernel mailing list