KVM: PPC: Book3S PR: Avoid changing TS bits when exiting guest
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 23 May 2018 07:01:55 +0000 (15:01 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 1 Jun 2018 00:29:42 +0000 (10:29 +1000)
commit36383a0862b68fc14b63dd6c93c64f1f82b6e8a9
tree2ebf34d92549e0ef2f75678124c3b77429b73824
parent401a89e9375c011de4e3271d50f27648b734a7cb
KVM: PPC: Book3S PR: Avoid changing TS bits when exiting guest

PR KVM host usually runs with TM enabled in its host MSR value, and
with non-transactional TS value.

When a guest with TM active traps into PR KVM host, the rfid at the
tail of kvmppc_interrupt_pr() will try to switch TS bits from
S0 (Suspended & TM disabled) to N1 (Non-transactional & TM enabled).

That will leads to TM Bad Thing interrupt.

This patch manually sets target TS bits unchanged to avoid this
exception.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_segment.S