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