Name Date Size #Lines LOC

..--

.gitignoreH A D20-Sep-2024179 1918

MakefileH A D20-Sep-20241.7 KiB5545

READMEH A D23-Feb-20213.1 KiB10175

TODOH A D31-May-2022248 87

asm-offsets.hH A D14-Dec-2022247 1312

asm-utils.SH A D31-May-20222.8 KiB173115

assembler.hH A D02-May-20231.2 KiB6950

fp-pidbench.SH A D02-May-20231.2 KiB7145

fp-ptrace-asm.SH A D15-Jul-20245.8 KiB280216

fp-ptrace.cH A D15-Jul-202435.1 KiB1,5041,168

fp-ptrace.hH A D15-Jul-2024251 147

fp-stress.cH A D20-Sep-202414.2 KiB658478

fpsimd-stressH A D23-Feb-2021714 6141

fpsimd-test.SH A D02-May-20235.7 KiB333227

kernel-test.cH A D20-Sep-20246.5 KiB325247

rdvl-sme.cH A D14-Dec-2022156 158

rdvl-sve.cH A D15-Jan-2022156 158

rdvl.SH A D14-Dec-2022251 2112

rdvl.hH A D14-Dec-2022124 105

sme-inst.hH A D02-May-20231.1 KiB7237

ssve-stressH A D14-Dec-2022691 6040

sve-probe-vls.cH A D15-Jan-20221.4 KiB6443

sve-ptrace.cH A D02-May-202318.3 KiB765577

sve-stressH A D23-Feb-2021690 6040

sve-test.SH A D15-Jul-20249.6 KiB585392

vec-syscfg.cH A D15-Jul-202418.2 KiB798587

vlset.cH A D14-Dec-20223.3 KiB162129

za-fork-asm.SH A D14-Dec-2022979 6241

za-fork.cH A D15-Jul-20242 KiB10163

za-ptrace.cH A D02-May-20237.7 KiB367257

za-stressH A D14-Dec-2022689 6040

za-test.SH A D15-Jul-20247.1 KiB404270

zt-ptrace.cH A D02-May-20236.9 KiB366271

zt-test.SH A D15-Jul-20245.5 KiB322211

README

1This directory contains a mix of tests integrated with kselftest and
2standalone stress tests.
3
4kselftest tests
5===============
6
7sve-probe-vls - Checks the SVE vector length enumeration interface
8sve-ptrace - Checks the SVE ptrace interface
9
10Running the non-kselftest tests
11===============================
12
13sve-stress performs an SVE context switch stress test, as described
14below.
15
16(The fpsimd-stress test works the same way; just substitute "fpsimd" for
17"sve" in the following commands.)
18
19
20The test runs until killed by the user.
21
22If no context switch error was detected, you will see output such as
23the following:
24
25$ ./sve-stress
26(wait for some time)
27^C
28Vector length:        512 bits
29PID:    1573
30Terminated by signal 15, no error, iterations=9467, signals=1014
31Vector length:  512 bits
32PID:    1575
33Terminated by signal 15, no error, iterations=9448, signals=1028
34Vector length:  512 bits
35PID:    1577
36Terminated by signal 15, no error, iterations=9436, signals=1039
37Vector length:  512 bits
38PID:    1579
39Terminated by signal 15, no error, iterations=9421, signals=1039
40Vector length:  512 bits
41PID:    1581
42Terminated by signal 15, no error, iterations=9403, signals=1039
43Vector length:  512 bits
44PID:    1583
45Terminated by signal 15, no error, iterations=9385, signals=1036
46Vector length:  512 bits
47PID:    1585
48Terminated by signal 15, no error, iterations=9376, signals=1039
49Vector length:  512 bits
50PID:    1587
51Terminated by signal 15, no error, iterations=9361, signals=1039
52Vector length:  512 bits
53PID:    1589
54Terminated by signal 15, no error, iterations=9350, signals=1039
55
56
57If an error was detected, details of the mismatch will be printed
58instead of "no error".
59
60Ideally, the test should be allowed to run for many minutes or hours
61to maximise test coverage.
62
63
64KVM stress testing
65==================
66
67To try to reproduce the bugs that we have been observing, sve-stress
68should be run in parallel in two KVM guests, while simultaneously
69running on the host.
70
711) Start 2 guests, using the following command for each:
72
73$ lkvm run --console=virtio -pconsole=hvc0 --sve Image
74
75(Depending on the hardware GIC implementation, you may also need
76--irqchip=gicv3.  New kvmtool defaults to that if appropriate, but I
77can't remember whether my branch is new enough for that.  Try without
78the option first.)
79
80Kvmtool occupies the terminal until you kill it (Ctrl+A x),
81or until the guest terminates.  It is therefore recommended to run
82each instance in separate terminal (use screen or ssh etc.)  This
83allows multiple guests to be run in parallel while running other
84commands on the host.
85
86Within the guest, the host filesystem is accessible, mounted on /host.
87
882) Run the sve-stress on *each* guest with the Vector-Length set to 32:
89guest$ ./vlset --inherit 32 ./sve-stress
90
913) Run the sve-stress on the host with the maximum Vector-Length:
92host$ ./vlset --inherit --max ./sve-stress
93
94
95Again, the test should be allowed to run for many minutes or hours to
96maximise test coverage.
97
98If no error is detected, you will see output from each sve-stress
99instance similar to that illustrated above; otherwise details of the
100observed mismatches will be printed.
101