[PATCH v5 06/10] powerpc64/ftrace: Disable ftrace during kvm entry/exit
    Steven Rostedt 
    rostedt at goodmis.org
       
    Fri Apr 20 01:22:16 AEST 2018
    
    
  
On Thu, 19 Apr 2018 12:34:05 +0530
"Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> wrote:
> 2. If we are a secondary thread in Power8, then we would be in nap due
> to SMT being disabled. We are woken up by an IPI to enter the guest. In
> this scenario, we enter the guest through kvm_start_guest(). We disable
> ftrace at this point. In this scenario, ftrace would only get re-enabled
> on the secondary thread when SMT is re-enabled (via start_secondary()).
> 
	trace_hardirqs_off();
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index bd63fa8a08b5..2c3cbe0067b2 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -342,6 +342,9 @@ kvm_start_guest:
>  
>  	ld	r2,PACATOC(r13)
>  
You may want to add a comment here about where ftrace gets re-enabled.
-- Steve
> +	li	r0,0
> +	stb	r0,PACA_FTRACE_ENABLED(r13)
> +
>  	li	r0,KVM_HWTHREAD_IN_KVM
>  	stb	r0,HSTATE_HWTHREAD_STATE(r13)
>  
    
    
More information about the Linuxppc-dev
mailing list