Skip to contentSkip to conversation

selftests/powerpc: Add test to check if VSRs are corrupted

PATCH Applied Rashmica Gupta 2 participants 2 messages Dec 8, 2015 – Dec 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 9bf6749550e3..b86c94ea462d 100644
@@ -5,3 +5,4 @@ tm-signal-stack
 tm-fork
 tm-dscr
 tm-tar
+tm-vmxcopy
tools/testing/selftests/powerpc/tm/Makefile +1 -1
index cd3d42a15601..fc9a5ed1aba2 100644
@@ -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