OSDN Git Service

KVM: PPC: Book3S HV: Work around XER[SO] bug in fake suspend mode
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Wed, 21 Mar 2018 10:32:02 +0000 (21:32 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 23 Mar 2018 13:39:16 +0000 (00:39 +1100)
commit87a11bb6a7f7d131bd2112f210eff780aa25b04c
treec259cbae76a135fa43af6af4a9d0c6524829d37f
parent4bb3c7a0208fc13ca70598efd109901a7cd45ae7
KVM: PPC: Book3S HV: Work around XER[SO] bug in fake suspend mode

This works around a hardware bug in "Nimbus" POWER9 DD2.2 processors,
where a treclaim performed in fake suspend mode can cause subsequent
reads from the XER register to return inconsistent values for the SO
(summary overflow) bit.  The inconsistent SO bit state can potentially
be observed on any thread in the core.  We have to do the treclaim
because that is the only way to get the thread out of suspend state
(fake or real) and into non-transactional state.

The workaround for the bug is to force the core into SMT4 mode before
doing the treclaim.  This patch adds the code to do that, conditional
on the CPU_FTR_P9_TM_XER_SO_BUG feature bit.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kvm/book3s_hv_rmhandlers.S