diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-11-23 12:52:31 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-24 13:09:03 +0300 |
commit | 9c5a432a558105d6145b058fad78eb6fcf3d4c38 (patch) | |
tree | 720d06d1fad98677d031f55d4e44a8738201c1fa /arch/powerpc/kvm/book3s_hv_hmi.c | |
parent | 6398326b9ba182936bdc9d66475c09e39b701aa2 (diff) | |
download | linux-9c5a432a558105d6145b058fad78eb6fcf3d4c38.tar.xz |
KVM: PPC: Book3S HV P9: Remove subcore HMI handling
On POWER9 and newer, rather than the complex HMI synchronisation and
subcore state, have each thread un-apply the guest TB offset before
calling into the early HMI handler.
This allows the subcore state to be avoided, including subcore enter
/ exit guest, which includes an expensive divide that shows up
slightly in profiles.
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-54-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_hmi.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_hmi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_hmi.c b/arch/powerpc/kvm/book3s_hv_hmi.c index 9af660476314..1ec50c69678b 100644 --- a/arch/powerpc/kvm/book3s_hv_hmi.c +++ b/arch/powerpc/kvm/book3s_hv_hmi.c @@ -20,10 +20,15 @@ void wait_for_subcore_guest_exit(void) /* * NULL bitmap pointer indicates that KVM module hasn't - * been loaded yet and hence no guests are running. + * been loaded yet and hence no guests are running, or running + * on POWER9 or newer CPU. + * * If no KVM is in use, no need to co-ordinate among threads * as all of them will always be in host and no one is going * to modify TB other than the opal hmi handler. + * + * POWER9 and newer don't need this synchronisation. + * * Hence, just return from here. */ if (!local_paca->sibling_subcore_state) |