KVM: PPC: Book3S HV: Update guest state entry/exit accounting to new API
authorNicholas Piggin <npiggin@gmail.com>
Thu, 8 Sep 2022 13:25:43 +0000 (23:25 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Sep 2022 15:07:19 +0000 (01:07 +1000)
commitb31bc24a49037aad7aa00d2b0354e9704d8134dc
tree7be488ef0e5f57ea95eea1b02d8087276f3433df
parentc953f7500b65f2b157d1eb468ca8b86328834cce
KVM: PPC: Book3S HV: Update guest state entry/exit accounting to new API

Update the guest state and timing entry/exit accounting to use the new
API, which was introduced following issues found[1]. KVM HV does
possibly call instrumented code inside the guest context, and it does
call srcu inside the guest context which is fragile at best.

Switch to the new API, moving the guest context inside the
srcu_read_lock/unlock region.

[1] https://lore.kernel.org/lkml/20220201132926.3301912-1-mark.rutland@arm.com/

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220908132545.4085849-3-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c