diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-07-12 11:36:50 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-07-15 21:53:37 +1000 |
commit | e44fbdb68049539de9923ce4bad2d277aef54892 (patch) | |
tree | b5df1f342f7f20f3be8d893210ec49b6d2401b20 /security | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) | |
download | linux-e44fbdb68049539de9923ce4bad2d277aef54892.tar.bz2 |
KVM: PPC: Book3S HV P9: Fix guest TM support
The conversion to C introduced several bugs in TM handling that can
cause host crashes with TM bad thing interrupts. Mostly just simple
typos or missed logic in the conversion that got through due to my
not testing TM in the guest sufficiently.
- Early TM emulation for the softpatch interrupt should be done if fake
suspend mode is _not_ active.
- Early TM emulation wants to return immediately to the guest so as to
not doom transactions unnecessarily.
- And if exiting from the guest, the host MSR should include the TM[S]
bit if the guest was T/S, before it is treclaimed.
After this fix, all the TM selftests pass when running on a P9 processor
that implements TM with softpatch interrupt.
Fixes: 89d35b2391015 ("KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C")
Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210712013650.376325-1-npiggin@gmail.com
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions