From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: Paul Mackerras <paulus@ozlabs.org>, kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: Book3S HV: Make sure to load LPID for radix VCPUs
Date: Tue, 14 May 2019 01:11:28 +0000 [thread overview]
Message-ID: <1557796288.1877.0.camel@gmail.com> (raw)
In-Reply-To: <20190513045818.GA10318@blackberry>
On Mon, 2019-05-13 at 14:58 +1000, Paul Mackerras wrote:
> Commit 70ea13f6e609 ("KVM: PPC: Book3S HV: Flush TLB on secondary
> radix
> threads", 2019-04-29) aimed to make radix guests that are using the
> real-mode entry path load the LPID register and flush the TLB in the
> same place where those things are done for HPT guests. However, it
> omitted to remove a branch which branches around that code for radix
> guests. The result is that with indep_thread_mode = N, radix guests
> don't run correctly. (With indep_threads_mode = Y, which is the
> default, radix guests use a different entry path.)
>
> This removes the offending branch, and also the load and compare that
> the branch depends on, since the cr7 setting is now unused.
>
> Reported-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> Fixes: 70ea13f6e609 ("KVM: PPC: Book3S HV: Flush TLB on secondary
> radix threads")
> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Tested-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> ---
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index ad1fc01..ad7bee9 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -581,11 +581,8 @@ kvmppc_hv_entry:
> 1:
> #endif
>
> - /* Use cr7 as an indication of radix mode */
> ld r5, HSTATE_KVM_VCORE(r13)
> ld r9, VCORE_KVM(r5) /* pointer to struct kvm
> */
> - lbz r0, KVM_RADIX(r9)
> - cmpwi cr7, r0, 0
>
> /*
> * POWER7/POWER8 host -> guest partition switch code.
> @@ -608,9 +605,6 @@ kvmppc_hv_entry:
> cmpwi r6,0
> bne 10f
>
> - /* Radix has already switched LPID and flushed core TLB */
> - bne cr7, 22f
> -
> lwz r7,KVM_LPID(r9)
> BEGIN_FTR_SECTION
> ld r6,KVM_SDR1(r9)
prev parent reply other threads:[~2019-05-14 1:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 4:58 [PATCH] KVM: PPC: Book3S HV: Make sure to load LPID for radix VCPUs Paul Mackerras
2019-05-14 1:11 ` Suraj Jitindar Singh [this message]
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=1557796288.1877.0.camel@gmail.com \
--to=sjitindarsingh@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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