@@ -198,3 +198,47 @@ presented). The transaction cannot then be continued and will take the failure
198
198
handler route. Furthermore, the transactional 2nd register state will be
199
199
inaccessible. GDB can currently be used on programs using TM, but not sensibly
200
200
in parts within transactions.
201
+
202
+ POWER9
203
+ ======
204
+
205
+ TM on POWER9 has issues with storing the complete register state. This
206
+ is described in this commit:
207
+
208
+ commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7
209
+ Author: Paul Mackerras <paulus@ozlabs.org>
210
+ Date: Wed Mar 21 21:32:01 2018 +1100
211
+ KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9
212
+
213
+ To account for this different POWER9 chips have TM enabled in
214
+ different ways.
215
+
216
+ On POWER9N DD2.01 and below, TM is disabled. ie
217
+ HWCAP2[PPC_FEATURE2_HTM] is not set.
218
+
219
+ On POWER9N DD2.1 TM is configured by firmware to always abort a
220
+ transaction when tm suspend occurs. So tsuspend will cause a
221
+ transaction to be aborted and rolled back. Kernel exceptions will also
222
+ cause the transaction to be aborted and rolled back and the exception
223
+ will not occur. If userspace constructs a sigcontext that enables TM
224
+ suspend, the sigcontext will be rejected by the kernel. This mode is
225
+ advertised to users with HWCAP2[PPC_FEATURE2_HTM_NO_SUSPEND] set.
226
+ HWCAP2[PPC_FEATURE2_HTM] is not set in this mode.
227
+
228
+ On POWER9N DD2.2 and above, KVM and POWERVM emulate TM for guests (as
229
+ described in commit 4bb3c7a0208f), hence TM is enabled for guests
230
+ ie. HWCAP2[PPC_FEATURE2_HTM] is set for guest userspace. Guests that
231
+ makes heavy use of TM suspend (tsuspend or kernel suspend) will result
232
+ in traps into the hypervisor and hence will suffer a performance
233
+ degradation. Host userspace has TM disabled
234
+ ie. HWCAP2[PPC_FEATURE2_HTM] is not set. (although we make enable it
235
+ at some point in the future if we bring the emulation into host
236
+ userspace context switching).
237
+
238
+ POWER9C DD1.2 and above are only available with POWERVM and hence
239
+ Linux only runs as a guest. On these systems TM is emulated like on
240
+ POWER9N DD2.2.
241
+
242
+ Guest migration from POWER8 to POWER9 will work with POWER9N DD2.2 and
243
+ POWER9C DD1.2. Since earlier POWER9 processors don't support TM
244
+ emulation, migration from POWER8 to POWER9 is not supported there.
0 commit comments