]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S PR: Fix failure status setting in tabort. emulation
authorSimon Guo <wei.guo.simon@gmail.com>
Fri, 8 Jun 2018 05:40:03 +0000 (01:40 -0400)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 12 Jun 2018 23:46:13 +0000 (09:46 +1000)
commitb119ada742fe2445a9f725eba2dc052d439819e2
tree8190e115a148df9b22b0795460d368fb2c70e6c6
parent2d16f4eabc9b9b94432ee3462efba3077a7aeb6d
KVM: PPC: Book3S PR: Fix failure status setting in tabort. emulation

tabort. will perform transaction failure recording and the recording
depends on TEXASR FS bit. Currently the TEXASR FS bit is retrieved
after tabort., when the TEXASR FS bit is already been updated by
tabort. itself.

This patch corrects this behavior by retrieving TEXASR val before
tabort.

tabort. will not immediately leads to transaction failure handling
in suspend state. So this patch also remove the mtspr on TEXASR/TFIAR
registers to avoid TM bad thing exception.

Fixes: e58384b09f71 ("KVM: PPC: Book3S PR: Add emulation for tabort. in privileged state")
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_emulate.c