[PATCH v2 10/14] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management
Nicholas Piggin
npiggin at gmail.com
Thu Aug 24 22:45:44 AEST 2017
On Thu, 24 Aug 2017 19:34:35 +1000
Paul Mackerras <paulus at ozlabs.org> wrote:
> On Sat, Aug 12, 2017 at 02:39:08AM +1000, Nicholas Piggin wrote:
> > 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.
>
> If/when we add support for running HPT guests on a radix host, we will
> have to run the host in single-threaded mode (since POWER9 doesn't
> support having some threads of a core using HPT and some using radix
> simultaneously). We'll then need some sort of thing like
> kvmppc_grab_hwthread to coordinate with the threads so that guests can
> use the secondary threads.
>
> So I think most of this code should stay. We will still need to have
> a way to make sure that the secondaries are in real mode and not in a
> guest, because all threads will need to be in real mode when switching
> the core between radix and HPT mode. Maybe we can optimize it a bit
> at present given that we don't yet support running HPT guests on a
> radix host, but I don't want to make it harder to do that in future.
Okay, most of the code's still there, just noped out with ARCH_300.
But yes this and then the subsequent patches do make it more
difficult to restore the KVM real mode functionality.
I'll see about restructuring them to keep that ability and make it
selectable with a minimal branchs or alt patches.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list