KVM: PPC: Book3S HV: POWER9 does not require secondary thread management
authorNicholas Piggin <npiggin@gmail.com>
Fri, 25 Aug 2017 04:30:33 +0000 (14:30 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 29 Aug 2017 04:48:59 +0000 (14:48 +1000)
commit94a04bc25a2c6296bd0c5e82c10e8231c2b11f77
treee299908064b8b13718b6f5915d9469d103125b0d
parent94171b19c3f1f4d9d4c0e3aaa1aa161def1ec7ea
KVM: PPC: Book3S HV: POWER9 does not require secondary thread management

POWER9 CPUs have independent MMU contexts per thread, so KVM does not
need to quiesce secondary threads, so the hwthread_req/hwthread_state
protocol does not have to be used. So patch it away on POWER9, and patch
away the branch from the Linux idle wakeup to kvm_start_guest that is
never used.

Add a warning and error out of kvmppc_grab_hwthread in case it is ever
called on POWER9.

This avoids a hwsync in the idle wakeup path on POWER9.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
[mpe: Use WARN(...) instead of WARN_ON()/pr_err(...)]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/kvm_book3s_asm.h
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S