OSDN Git Service

selftests/powerpc: Check FP/VEC on exception in TM
authorGustavo Romero <gromero@linux.vnet.ibm.com>
Wed, 1 Nov 2017 19:23:41 +0000 (15:23 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Nov 2017 04:50:21 +0000 (15:50 +1100)
commit77fad8bfb1d2f8225b05e4ea34457875fcfae37e
treedf158bda5a5542d731403989d1a0005dd1cc3fd3
parent80eff6c484799722736471d15ff9cc86b64cae7a
selftests/powerpc: Check FP/VEC on exception in TM

Add a self test to check if FP/VEC/VSX registers are sane (restored
correctly) after a FP/VEC/VSX unavailable exception is caught during a
transaction.

This test checks all possibilities in a thread regarding the combination
of MSR.[FP|VEC] states in a thread and for each scenario raises a
FP/VEC/VSX unavailable exception in transactional state, verifying if
vs0 and vs32 registers, which are representatives of FP/VEC/VSX reg
sets, are not corrupted.

Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/tm/.gitignore
tools/testing/selftests/powerpc/tm/Makefile
tools/testing/selftests/powerpc/tm/tm-unavailable.c [new file with mode: 0644]
tools/testing/selftests/powerpc/tm/tm.h