linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH v2 10/14] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management
Date: Thu, 24 Aug 2017 22:45:44 +1000	[thread overview]
Message-ID: <20170824224544.0d53c27c@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170824093435.GH27401@fergus.ozlabs.ibm.com>

On Thu, 24 Aug 2017 19:34:35 +1000
Paul Mackerras <paulus@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

  reply	other threads:[~2017-08-24 12:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 16:38 [PATCH v2 00/14] idle and soft-irq improvements and POWER9 idle optimisation Nicholas Piggin
2017-08-11 16:38 ` [PATCH v2 01/14] powerpc/64s: masked interrupt avoid branch Nicholas Piggin
2017-08-24 12:37   ` [v2,01/14] " Michael Ellerman
2017-08-11 16:39 ` [PATCH v2 02/14] powerpc/64s: masked interrupt avoid instruction Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 03/14] powerpc/64s: masked interrupt returns to kernel so avoid r13 restore Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 04/14] powerpc/64: cleanup __check_irq_replay Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 05/14] powerpc/64s: irq replay merge HV and non-HV paths for doorbell replay Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 06/14] powerpc/64s: irq replay external use the HV handler in HV mode on POWER9 Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 07/14] powerpc/64: remove redundant instruction in interrupt replay Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 08/14] powerpc/64s: irq replay remove spurious irq reason Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 09/14] powerpc/64: runlatch CTRL[RUN] set optimisation Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 10/14] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management Nicholas Piggin
2017-08-24  9:34   ` Paul Mackerras
2017-08-24 12:45     ` Nicholas Piggin [this message]
2017-08-11 16:39 ` [PATCH v2 11/14] powerpc/64s: idle POWER9 can execute stop without a sync sequence Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 12/14] KVM: PPC: Book3S HV: " Nicholas Piggin
2017-08-24 10:27   ` Paul Mackerras
2017-08-24 12:53     ` Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 13/14] powerpc/64s: idle POWER9 can execute stop in virtual mode Nicholas Piggin
2017-08-11 16:39 ` [PATCH v2 14/14] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170824224544.0d53c27c@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).