summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/debug.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2018-03-21 13:32:03 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-23 16:39:17 +0300
commit681c617b7c42fce0798c2b0b472f270f28c82d56 (patch)
tree6fdbac4b707085ff9cd5540070ce9c555148f904 /arch/powerpc/include/asm/debug.h
parent87a11bb6a7f7d131bd2112f210eff780aa25b04c (diff)
downloadlinux-681c617b7c42fce0798c2b0b472f270f28c82d56.tar.xz
KVM: PPC: Book3S HV: Work around TEXASR bug in fake suspend state
This works around a hardware bug in "Nimbus" POWER9 DD2.2 processors, where the contents of the TEXASR can get corrupted while a thread is in fake suspend state. The workaround is for the instruction emulation code to use the value saved at the most recent guest exit in real suspend mode. We achieve this by simply not saving the TEXASR into the vcpu struct on an exit in fake suspend state. We also have to take care to set the orig_texasr field only on guest exit in real suspend state. This also means that on guest entry in fake suspend state, TEXASR will be restored to the value it had on the last exit in real suspend state, effectively counteracting any hardware-caused corruption. This works because TEXASR may not be written in suspend state. With this, the guest might see the wrong values in TEXASR if it reads it while in suspend state, but will see the correct value in non-transactional state (e.g. after a treclaim), and treclaim will work correctly. With this workaround, the code will actually run slightly faster, and will operate correctly on systems without the TEXASR bug (since TEXASR may not be written in suspend state, and is only changed by failure recording, which will have already been done before we get into fake suspend state). Therefore these changes are not made subject to a CPU feature bit. Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/debug.h')
0 files changed, 0 insertions, 0 deletions