lkml.org 
[lkml]   [2019]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 23/27] x86/fpu: Defer FPU state load until return to userspace
On 2019-04-12 16:36:15 [+0200], Borislav Petkov wrote:
> On Wed, Apr 03, 2019 at 06:41:52PM +0200, Sebastian Andrzej Siewior wrote:
> > @@ -226,10 +236,9 @@ static void fpu__initialize(struct fpu *fpu)
> > {
> > WARN_ON_FPU(fpu != &current->thread.fpu);
> >
> > + set_thread_flag(TIF_NEED_FPU_LOAD);
> > fpstate_init(&fpu->state);
> > trace_x86_fpu_init_state(fpu);
> > -
> > - trace_x86_fpu_activate_state(fpu);
>
> That is called nowhere after this patch.

Isn't it called from fpu__clear()?

> Shouldn't it be called below, before fpregs_activate() because
> fpregs_activate() does trace_x86_fpu_regs_activated()?

Why? fpu__initialize() wipes the FPU state and starts from zero.
fpregs_mark_activate() on the other hand marks this FPU context is
currently active.

Sebastian

\
 
 \ /
  Last update: 2019-04-12 17:25    [W:0.068 / U:0.640 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site