From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Sun, 26 Nov 2017 21:58:07 +0000 Subject: Re: [PATCH v2 11/11] powerpc/kvm: Use the PACA virt/real mode info instead of mfmsr Message-Id: <1511733487.2466.66.camel@kernel.crashing.org> List-Id: References: <20171123043619.15301-1-benh@kernel.crashing.org> <20171123043619.15301-11-benh@kernel.crashing.org> <20171125051709.GC10920@fergus.ozlabs.ibm.com> In-Reply-To: <20171125051709.GC10920@fergus.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mackerras Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On Sat, 2017-11-25 at 16:17 +1100, Paul Mackerras wrote: > On Thu, Nov 23, 2017 at 03:36:19PM +1100, Benjamin Herrenschmidt wrote: > > This shaves off a bunch of cycles from the KVM exit path > > and the XIVE related hypercall. > > Comment below... > > > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > index 83862fba8cfb..ade13f7a9077 100644 > > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > @@ -81,6 +81,8 @@ _GLOBAL_TOC(kvmppc_hv_entry_trampoline) > > RFI > > > > kvmppc_call_hv_entry: > > + li r0,0 > > + stb r0,HSTATE_EXIT_VIRT(r13) > > Don't we need to clear HSTATE_EXIT_VIRT(r13) similarly in the entry > path for offline secondary CPU threads, i.e. somewhere around the > kvm_secondary_got_guest label? Quite possibly, I am not too familiar with that path. I'll have a look. Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH v2 11/11] powerpc/kvm: Use the PACA virt/real mode info instead of mfmsr Date: Mon, 27 Nov 2017 08:58:07 +1100 Message-ID: <1511733487.2466.66.camel@kernel.crashing.org> References: <20171123043619.15301-1-benh@kernel.crashing.org> <20171123043619.15301-11-benh@kernel.crashing.org> <20171125051709.GC10920@fergus.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org To: Paul Mackerras Return-path: Received: from gate.crashing.org ([63.228.1.57]:35435 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbdKZV6N (ORCPT ); Sun, 26 Nov 2017 16:58:13 -0500 In-Reply-To: <20171125051709.GC10920@fergus.ozlabs.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, 2017-11-25 at 16:17 +1100, Paul Mackerras wrote: > On Thu, Nov 23, 2017 at 03:36:19PM +1100, Benjamin Herrenschmidt wrote: > > This shaves off a bunch of cycles from the KVM exit path > > and the XIVE related hypercall. > > Comment below... > > > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > index 83862fba8cfb..ade13f7a9077 100644 > > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > > @@ -81,6 +81,8 @@ _GLOBAL_TOC(kvmppc_hv_entry_trampoline) > > RFI > > > > kvmppc_call_hv_entry: > > + li r0,0 > > + stb r0,HSTATE_EXIT_VIRT(r13) > > Don't we need to clear HSTATE_EXIT_VIRT(r13) similarly in the entry > path for offline secondary CPU threads, i.e. somewhere around the > kvm_secondary_got_guest label? Quite possibly, I am not too familiar with that path. I'll have a look. Cheers, Ben.