KVM: PPC: Book3S HV P9: Reduce mftb per guest entry/exit
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:51:44 +0000 (19:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:08:57 +0000 (21:08 +1100)
commit34bf08a2079fffc7206a1ae93086ab8167e0afb6
tree4317b21407fa968de30134a48317748a86d45d69
parent9581991a60817abe311c2581ae4554b28bfa32f1
KVM: PPC: Book3S HV P9: Reduce mftb per guest entry/exit

mftb is serialising (dispatch next-to-complete) so it is heavy weight
for a mfspr. Avoid reading it multiple times in the entry or exit paths.
A small number of cycles delay to timers is tolerable.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-7-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_p9_entry.c