Re: [PATCH v2 6/7] x86/power: Sprinkle some noinstr

2023-01-17 Thread Ingo Molnar
* Peter Zijlstra wrote: > Nope, they do as they say on the tin. > > noinstr void foo(void) > { > } > > declares the whole function as non-instrumented. > > Within such functions, we demark regions where instrumentation is > allowed by: > > noinstr void foo(void) > { > instrumentation_

Re: [PATCH v2 6/7] x86/power: Sprinkle some noinstr

2023-01-17 Thread Peter Zijlstra
On Tue, Jan 17, 2023 at 10:31:05AM +0100, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > + /* > > +* Definitely wrong, but at this point we should have at least enough > > +* to do CALL/RET (consider SKL callthunks) and this avoids having > > +* to deal with the noinstr explo

Re: [PATCH v2 6/7] x86/power: Sprinkle some noinstr

2023-01-17 Thread Ingo Molnar
* Peter Zijlstra wrote: > + /* > + * Definitely wrong, but at this point we should have at least enough > + * to do CALL/RET (consider SKL callthunks) and this avoids having > + * to deal with the noinstr explosion for now :/ > + */ > + instrumentation_begin(); BTW.

[PATCH v2 6/7] x86/power: Sprinkle some noinstr

2023-01-16 Thread Peter Zijlstra
Ensure no compiler instrumentation sneaks in while restoring the CPU state. Specifically we can't handle CALL/RET until GS is restored. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/power/cpu.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) --- a/arch/x86/power/cpu.