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.