Re: [PATCH v5 06/10] powerpc64/ftrace: Disable ftrace during kvm entry/exit
From: Naveen N. Rao <hidden>
Date: 2018-04-20 06:31:44
Steven Rostedt wrote:
On Thu, 19 Apr 2018 12:34:05 +0530 "Naveen N. Rao" [off-list ref] wrote: =20quoted
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()). =20trace_hardirqs_off();quoted
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/=
book3s_hv_rmhandlers.S
quoted
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:=20 ld r2,PACATOC(r13) =20=20 You may want to add a comment here about where ftrace gets re-enabled.
Sure. That would be: /* * If this is the primary thread, ftrace will get re-enabled when we * go back to the hypervisor in kvmppc_run_core(). For secondary threads=20 * on Power8, ftrace will get enabled when SMT is re-enabled through the=20 * start_secondary() cpu bringup path. */ - Naveen =