]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV Nested: Avoid extra mftb() in nested entry
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:52:22 +0000 (19:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:09:02 +0000 (21:09 +1100)
commit5b752705ca50cf80b6a4147fbad97068b6b7a077
treeaf24a8dc8afc9b6493cd93ee7b9d296516edcde4
parentb45a08573cbd58a26c0a9dd6686ffad358b74d57
KVM: PPC: Book3S HV Nested: Avoid extra mftb() in nested entry

mftb() is expensive and one can be avoided on nested guest dispatch.

If the time checking code distinguishes between the L0 timer and the
nested HV timer, then both can be tested in the same place with the
same mftb() value.

This also nicely illustrates the relationship between the L0 and nested
HV timers.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-45-npiggin@gmail.com
arch/powerpc/include/asm/kvm_asm.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_nested.c