linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel Sangorrin" <daniel.sangorrin@toshiba.co.jp>
To: "'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>,
	"'Andy Lutomirski'" <luto@kernel.org>,
	"'Rik van Riel'" <riel@redhat.com>,
	"'Borislav Petkov'" <bp@alien8.de>,
	"'Brian Gerst'" <brgerst@gmail.com>,
	"'Dave Hansen'" <dave.hansen@linux.intel.com>,
	"'Denys Vlasenko'" <dvlasenk@redhat.com>,
	"'Fenghua Yu'" <fenghua.yu@intel.com>,
	"'H. Peter Anvin'" <hpa@zytor.com>,
	"'Josh Poimboeuf'" <jpoimboe@redhat.com>,
	"'Linus Torvalds'" <torvalds@linux-foundation.org>,
	"'Oleg Nesterov'" <oleg@redhat.com>,
	"'Peter Zijlstra'" <peterz@infradead.org>,
	"'Quentin Casasnovas'" <quentin.casasnovas@oracle.com>,
	"'Thomas Gleixner'" <tglx@linutronix.de>, <pbonzini@redhat.com>,
	"'Ingo Molnar'" <mingo@kernel.org>
Subject: RE: [PATCH 4.4 10/24] x86/fpu: Hard-disable lazy FPU mode
Date: Fri, 15 Jun 2018 18:49:12 +0900	[thread overview]
Message-ID: <002201d4048e$1d854f50$588fedf0$@toshiba.co.jp> (raw)
In-Reply-To: <20180615070619.GA25325@kroah.com>

> -----Original Message-----
> From: 'Greg Kroah-Hartman' [mailto:gregkh@linuxfoundation.org]
> Sent: Friday, June 15, 2018 4:06 PM
> To: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> Cc: linux-kernel@vger.kernel.org; stable@vger.kernel.org; 'Andy Lutomirski'
> <luto@kernel.org>; 'Rik van Riel' <riel@redhat.com>; 'Borislav Petkov'
> <bp@alien8.de>; 'Brian Gerst' <brgerst@gmail.com>; 'Dave Hansen'
> <dave.hansen@linux.intel.com>; 'Denys Vlasenko' <dvlasenk@redhat.com>;
> 'Fenghua Yu' <fenghua.yu@intel.com>; 'H. Peter Anvin' <hpa@zytor.com>; 'Josh
> Poimboeuf' <jpoimboe@redhat.com>; 'Linus Torvalds'
> <torvalds@linux-foundation.org>; 'Oleg Nesterov' <oleg@redhat.com>; 'Peter
> Zijlstra' <peterz@infradead.org>; 'Quentin Casasnovas'
> <quentin.casasnovas@oracle.com>; 'Thomas Gleixner' <tglx@linutronix.de>;
> pbonzini@redhat.com; 'Ingo Molnar' <mingo@kernel.org>
> Subject: Re: [PATCH 4.4 10/24] x86/fpu: Hard-disable lazy FPU mode
> 
> On Fri, Jun 15, 2018 at 02:23:08PM +0900, Daniel Sangorrin wrote:
> > > -----Original Message-----
> > > From: stable-owner@vger.kernel.org [mailto:stable-owner@vger.kernel.org]
> On
> > > Behalf Of 'Greg Kroah-Hartman'
> > > Sent: Friday, June 15, 2018 1:56 PM
> > > To: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> > > Cc: linux-kernel@vger.kernel.org; stable@vger.kernel.org; 'Andy Lutomirski'
> > > <luto@kernel.org>; 'Rik van Riel' <riel@redhat.com>; 'Borislav Petkov'
> > > <bp@alien8.de>; 'Brian Gerst' <brgerst@gmail.com>; 'Dave Hansen'
> > > <dave.hansen@linux.intel.com>; 'Denys Vlasenko' <dvlasenk@redhat.com>;
> > > 'Fenghua Yu' <fenghua.yu@intel.com>; 'H. Peter Anvin' <hpa@zytor.com>;
> 'Josh
> > > Poimboeuf' <jpoimboe@redhat.com>; 'Linus Torvalds'
> > > <torvalds@linux-foundation.org>; 'Oleg Nesterov' <oleg@redhat.com>; 'Peter
> > > Zijlstra' <peterz@infradead.org>; 'Quentin Casasnovas'
> > > <quentin.casasnovas@oracle.com>; 'Thomas Gleixner' <tglx@linutronix.de>;
> > > pbonzini@redhat.com; 'Ingo Molnar' <mingo@kernel.org>
> > > Subject: Re: [PATCH 4.4 10/24] x86/fpu: Hard-disable lazy FPU mode
> > >
> > > On Fri, Jun 15, 2018 at 01:24:27PM +0900, Daniel Sangorrin wrote:
> > > > Hi Greg,
> > > >
> > > > >  /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
> > > > > --- a/arch/x86/include/asm/fpu/internal.h
> > > > > +++ b/arch/x86/include/asm/fpu/internal.h
> > > > > @@ -58,7 +58,7 @@ extern u64 fpu__get_supported_xfeatures_
> > > > >   */
> > > > >  static __always_inline __pure bool use_eager_fpu(void)
> > > > >  {
> > > > > -	return static_cpu_has_safe(X86_FEATURE_EAGER_FPU);
> > > > > +	return true;
> > > > >  }
> > > >
> > > > Since this function returns always true then we can remove the code
> depending on
> > > lazy FPU mode.
> > > > Actually this has already been done in "x86/fpu: Remove use_eager_fpu()"
> > > > Ref: https://patchwork.kernel.org/patch/9365883/
> > > >
> > > > >  static void __init fpu__init_parse_early_param(void)
> > > > >  {
> > > > > -	if (cmdline_find_option_bool(boot_command_line,
> "eagerfpu=off")) {
> > > > > -		eagerfpu = DISABLE;
> > > > > -		fpu__clear_eager_fpu_features();
> > > > > -	}
> > > >
> > > > Since this patch removes the kernel boot parameter "eagerfpu", maybe we
> should
> > > remove it from the Documentation.
> > > > This has also been done by commit "x86/fpu: Finish excising 'eagerfpu'"
> > > > Ref: https://patchwork.kernel.org/patch/9380673/
> > > >
> > > > I will try backporting those patches unless anyone has any objections.
> > >
> > > What are the git commit ids of those patches in Linus's tree?  No need
> > > to point to patchwork links, I don't use that tool.
> >
> > OK, I got it.
> >
> > "x86/fpu: Remove use_eager_fpu()":
> c592b57347069abfc0dcad3b3a302cf882602597
> > "x86/fpu: Finish excising 'eagerfpu'":
> e63650840e8b053aa09ad934877e87e9941ed135
> 
> Minor nit.  For kernel commits, the "normal" way we reference them looks
> like this:
> 	c592b5734706 ("x86/fpu: Remove use_eager_fpu()")
> 	e63650840e8b ("x86/fpu: Finish excising 'eagerfpu'")
> 
> Which makes it much easier to read and understand.  That's what we use
> for the "Fixes:" tag in commits and in other places (text in commit
> messages.)
> 
> To automatically generate that format, you can just do:
> 	git show -s --abbrev-commit --abbrev=12 --pretty=format:"%h
> (\"%s\")%n"
> 
> I recommend just setting up an alias for the above line, otherwise it's
> a pain to have to remember how to do it all the time.  Here's what I do:
> 	$ alias gsr='git show -s --abbrev-commit --abbrev=12 --pretty=format:"%h
> (\"%s\")%n"'
> 	$ gsr c592b57347069abfc0dcad3b3a302cf882602597
> 	c592b5734706 ("x86/fpu: Remove use_eager_fpu()")
> 

Thanks a lot for the detailed explanation.

> > Unfortunately, they don't apply cleanly to stable kernels.
> 
> Should be very simple to backport if you want to.  Also I need copies
> for the 4.9.y tree as well if you do so.

OK, I will do it after the OSS Japan next week if you don't mind. I also want to run some tests for the FPU and try different boot parameter combinations (e.g. no387, nofxsr etc) to check I didn't break anything.

Thanks,
Daniel



> 
> thanks,
> 
> greg k-h




  reply	other threads:[~2018-06-15  9:50 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 14:04 [PATCH 4.4 00/24] 4.4.138-stable review Greg Kroah-Hartman
2018-06-14 14:04 ` [PATCH 4.4 01/24] x86/fpu: Fix early FPU command-line parsing Greg Kroah-Hartman
2018-06-14 14:04 ` [PATCH 4.4 02/24] x86: Remove unused function cpu_has_ht_siblings() Greg Kroah-Hartman
2018-06-14 14:04 ` [PATCH 4.4 03/24] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros Greg Kroah-Hartman
2018-06-14 14:04 ` [PATCH 4.4 04/24] x86/fpu: Disable MPX when eagerfpu is off Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 05/24] x86/fpu: Disable AVX " Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 06/24] x86/fpu: Default eagerfpu=on on all CPUs Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 07/24] x86/fpu: Fix no387 regression Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 08/24] x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off") Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 09/24] x86/fpu: Fix eager-FPU handling on legacy FPU machines Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 10/24] x86/fpu: Hard-disable lazy FPU mode Greg Kroah-Hartman
2018-06-15  4:24   ` Daniel Sangorrin
2018-06-15  4:56     ` 'Greg Kroah-Hartman'
2018-06-15  5:23       ` Daniel Sangorrin
2018-06-15  7:06         ` 'Greg Kroah-Hartman'
2018-06-15  9:49           ` Daniel Sangorrin [this message]
2018-06-19 15:02     ` Ben Hutchings
2018-06-14 14:05 ` [PATCH 4.4 11/24] x86/fpu: Fix FNSAVE usage in eagerfpu mode Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 12/24] x86/fpu: Fix math emulation in eager fpu mode Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 13/24] af_key: Always verify length of provided sadb_key Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 14/24] x86/crypto, x86/fpu: Remove X86_FEATURE_EAGER_FPU #ifdef from the crc32c code Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 15/24] gpio: No NULL owner Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 16/24] Clarify (and fix) MAX_LFS_FILESIZE macros Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 17/24] KVM: x86: introduce linear_{read,write}_system Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 18/24] KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 19/24] serial: samsung: fix maxburst parameter for DMA transactions Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 20/24] vmw_balloon: fixing double free when batching mode is off Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 21/24] kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 22/24] Input: goodix - add new ACPI id for GPD Win 2 touch screen Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 23/24] Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID Greg Kroah-Hartman
2018-06-14 14:05 ` [PATCH 4.4 24/24] crypto: vmx - Remove overly verbose printk from AES init routines Greg Kroah-Hartman
2018-06-14 16:57 ` [PATCH 4.4 00/24] 4.4.138-stable review Nathan Chancellor
2018-06-14 18:47   ` Greg Kroah-Hartman
2018-06-14 22:43 ` Shuah Khan
2018-06-15  0:24 ` Naresh Kamboju
2018-06-15 15:18 ` Guenter Roeck
2018-06-19 14:28 ` Ben Hutchings
2018-06-28  4:09   ` Daniel Sangorrin
2018-07-05 16:08   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002201d4048e$1d854f50$588fedf0$@toshiba.co.jp' \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvlasenk@redhat.com \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=quentin.casasnovas@oracle.com \
    --cc=riel@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).