[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1904090926330.2069@nanos.tec.linutronix.de>
Date: Tue, 9 Apr 2019 09:27:05 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Andy Lutomirski <luto@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
kvm@...r.kernel.org, "Jason A. Donenfeld" <Jason@...c4.com>,
Rik van Riel <riel@...riel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 24/27] x86/fpu: Add a fastpath to __fpu__restore_sig()
On Mon, 8 Apr 2019, Sebastian Andrzej Siewior wrote:
> On 2019-04-08 19:05:56 [+0200], Thomas Gleixner wrote:
> > > diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
> > > index a5b086ec426a5..f20e1d1fffa29 100644
> > > --- a/arch/x86/kernel/fpu/signal.c
> > > +++ b/arch/x86/kernel/fpu/signal.c
> > > @@ -242,10 +242,10 @@ sanitize_restored_xstate(union fpregs_state *state,
> > > /*
> > > * Restore the extended state if present. Otherwise, restore the FP/SSE state.
> > > */
> > > -static inline int copy_user_to_fpregs_zeroing(void __user *buf, u64 xbv, int fx_only)
> > > +static int copy_user_to_fpregs_zeroing(void __user *buf, u64 xbv, int fx_only)
> > > {
> > > if (use_xsave()) {
> > > - if ((unsigned long)buf % 64 || fx_only) {
> > > + if (fx_only) {
> >
> > This change is weird and not mentioned in the changelog....
>
> if you scroll up there is this:
> | * to loaded again on return to userland (overriding last_cpu avoids the
> | * optimisation).
> | */
> | set_thread_flag(TIF_NEED_FPU_LOAD);
> | __fpu_invalidate_fpregs_state(fpu);
> |
> | if ((unsigned long)buf_fx % 64)
> | fx_only = 1;
> …
> | ret = copy_user_to_fpregs_zeroing(buf_fx, xfeatures, fx_only);
> | pagefault_enable();
>
>
> so I just removed that part because it was already done earlier.
> Is it still weird and should be mentioned in the changelog?
Bah. Staring at this for too long. All good ...
Powered by blists - more mailing lists