selftests/powerpc: Add test to check if VSRs are corrupted
PATCH 1/1 selftests/powerpc: Add test to check if VSRs are corrupted
When a transaction is aborted, VSR values should rollback to the checkpointed values before the transaction began. VSRs used elsewhere in the kernel during a transaction, or while the transaction is suspended should not affect the checkpointed values.
---
Prior to the bug fix in "powerpc: Don't corrupt transactional state when using FP/VMX in kernel", when VMX was requested by the kernel the .vr_state (which held the checkpointed state of VSRs before the transaction) was overwritten with the current state from outside the transation. Thus if the transaction did not complete, the VSR values would be "rolled back" to potentially incorrect values.
tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 2 +- tools/testing/selftests/powerpc/tm/tm-vmxcopy.c | 104 ++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/powerpc/tm/tm-vmxcopy.c
tools/testing/selftests/powerpc/tm/.gitignore +1 -0
@@ -5,3 +5,4 @@ tm-signal-stack tm-fork tm-dscr tm-tar +tm-vmxcopy
tools/testing/selftests/powerpc/tm/Makefile +1 -1
@@ -1,4 +1,4 @@ -TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-fork tm-dscr tm-tar tm-signal-stack +TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-fork tm-dscr tm-tar tm-vmxcopy tm-signal-stack all: $(TEST_PROGS)
tools/testing/selftests/powerpc/tm/tm-vmxcopy.c new file +104 -0
104 lines not on this page · raw message
Signature · 1 line
2.5.0
Quoted 6 lines · Rashmica Gupta
When a transaction is aborted, VSR values should rollback to the checkpointed values before the transaction began. VSRs used elsewhere in the kernel during a transaction, or while the transaction is suspended should not affect the checkpointed values.
Signed-off-by Rashmica Gupta <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5f337e3e5b04b32793fd51ad
cheers