Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp578853imm; Fri, 15 Jun 2018 02:51:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLdGZBbDBgZsmcnu0RWvvkmU7iplu8aA30T78xktxOhDed2NsIINmHVUW8ao3Foj6EeSC6X X-Received: by 2002:a17:902:8347:: with SMTP id z7-v6mr1232774pln.290.1529056280470; Fri, 15 Jun 2018 02:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529056280; cv=none; d=google.com; s=arc-20160816; b=uB0uMH54y/yLVDG9wnQZZbmPdFHGQWTw9BStPZrnrUVjb0JaDr8cJurrYpgMGCi0h7 +GxTbh/jrK4TlfgxlixSAr4ALB4NydyDfqfkwJ2+Xfe42mmnispBnsr31VpP3mvscFSZ oOgp/aTxJvZLo1kpeeOj0kyYTW78LOxSUYQPM12l1b/2OvZ7y7T8yF4VpswtMkI+yACW renoCQR6M1svvyshiL6vm36RnksOBJtGzgR52ACvyHuOvmHaz/xbfcW/LSo4641Wm8uW f6HcP4Usbu7/yegHOQhapZX+iDExj8wGiSxrOBb13dLuqFShZFVXQaD8G4Nqey9EEZ+H 1PwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=j4pGkqvuS0o0fKgQ0Aw2p9SP5JHa0q0lLew0/VIpJMU=; b=zjuLyw/iy0ilWRISuBRqu42UrxP2Mp1oKA+GUdwT7u2b+6ovOgU/TU/66St9AqQUek /N4K9L93wBTyLzKGWUOuGuqgvDcpLtfpEvQsk2p0kRiEtsEfWCXhllPSf9u99tBRD8mY vjqrOofIFDcVNP0mHAzrmD7xbsA0JTIERVeu50eXpbDcs+Cyn+1fgxQby27kNJdZCNpw mk2I8N1fgDYqxR25golEaHdZm7D9A5wqWHESDPsxbOaDbOWdOqQ/MQmEJ+jrMEQ4v6p7 93dQg7a81Hk1mbjZCb4GFQUg/6WVEtDh9j+lG15bJ8VO+SRjvW9izocNsr3m+vxIvRwv kWiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i26-v6si6120460pgn.433.2018.06.15.02.51.02; Fri, 15 Jun 2018 02:51:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755954AbeFOJud convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Jun 2018 05:50:33 -0400 Received: from mo-csw1116.securemx.jp ([210.130.202.158]:54158 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755735AbeFOJub (ORCPT ); Fri, 15 Jun 2018 05:50:31 -0400 Received: by mo-csw.securemx.jp (mx-mo-csw1116) id w5F9nKkJ023010; Fri, 15 Jun 2018 18:49:20 +0900 X-Iguazu-Qid: 2wGqn6MRrs6ISYajcP X-Iguazu-QSIG: v=1; s=0; t=1529056159; q=2wGqn6MRrs6ISYajcP; m=73e5pGUCYMSbQnd8oSh7riUMZ/KmDP7VqYvMyWU6zs4= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1111) id w5F9nEXL015306; Fri, 15 Jun 2018 18:49:14 +0900 Received: from hop001.toshiba.co.jp ([133.199.164.63]) by imx2.toshiba.co.jp with ESMTP id w5F9nEKb022085; Fri, 15 Jun 2018 18:49:14 +0900 (JST) From: "Daniel Sangorrin" To: "'Greg Kroah-Hartman'" Cc: , , "'Andy Lutomirski'" , "'Rik van Riel'" , "'Borislav Petkov'" , "'Brian Gerst'" , "'Dave Hansen'" , "'Denys Vlasenko'" , "'Fenghua Yu'" , "'H. Peter Anvin'" , "'Josh Poimboeuf'" , "'Linus Torvalds'" , "'Oleg Nesterov'" , "'Peter Zijlstra'" , "'Quentin Casasnovas'" , "'Thomas Gleixner'" , , "'Ingo Molnar'" References: <20180614132724.483802160@linuxfoundation.org> <20180614132724.905032027@linuxfoundation.org> <000c01d40460$bfc97710$3f5c6530$@toshiba.co.jp> <20180615045604.GA8664@kroah.com> <000d01d40468$f2109570$d631c050$@toshiba.co.jp> <20180615070619.GA25325@kroah.com> In-Reply-To: <20180615070619.GA25325@kroah.com> Subject: RE: [PATCH 4.4 10/24] x86/fpu: Hard-disable lazy FPU mode Date: Fri, 15 Jun 2018 18:49:12 +0900 X-TSB-HOP: ON Message-ID: <002201d4048e$1d854f50$588fedf0$@toshiba.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGUQj4igkaupq7EehpFPqRFc6I8UgHKB38SAimvd0gBXoRCXgDMhTFaAfEAKtqkoBhoQA== Content-Language: ja Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: 'Greg Kroah-Hartman' [mailto:gregkh@linuxfoundation.org] > Sent: Friday, June 15, 2018 4:06 PM > To: Daniel Sangorrin > Cc: linux-kernel@vger.kernel.org; stable@vger.kernel.org; 'Andy Lutomirski' > ; 'Rik van Riel' ; 'Borislav Petkov' > ; 'Brian Gerst' ; 'Dave Hansen' > ; 'Denys Vlasenko' ; > 'Fenghua Yu' ; 'H. Peter Anvin' ; 'Josh > Poimboeuf' ; 'Linus Torvalds' > ; 'Oleg Nesterov' ; 'Peter > Zijlstra' ; 'Quentin Casasnovas' > ; 'Thomas Gleixner' ; > pbonzini@redhat.com; 'Ingo Molnar' > 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 > > > Cc: linux-kernel@vger.kernel.org; stable@vger.kernel.org; 'Andy Lutomirski' > > > ; 'Rik van Riel' ; 'Borislav Petkov' > > > ; 'Brian Gerst' ; 'Dave Hansen' > > > ; 'Denys Vlasenko' ; > > > 'Fenghua Yu' ; 'H. Peter Anvin' ; > 'Josh > > > Poimboeuf' ; 'Linus Torvalds' > > > ; 'Oleg Nesterov' ; 'Peter > > > Zijlstra' ; 'Quentin Casasnovas' > > > ; 'Thomas Gleixner' ; > > > pbonzini@redhat.com; 'Ingo Molnar' > > > 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