From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 07D087D584 for ; Tue, 25 Sep 2018 17:28:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbeIYXhC (ORCPT ); Tue, 25 Sep 2018 19:37:02 -0400 Received: from mga14.intel.com ([192.55.52.115]:25265 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbeIYXhC (ORCPT ); Tue, 25 Sep 2018 19:37:02 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 10:28:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,303,1534834800"; d="scan'208";a="83179144" Received: from 2b52.sc.intel.com ([143.183.136.51]) by FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2018 10:28:31 -0700 Message-ID: <57ab71005afeaeb195a49c72ae8c76481023130f.camel@intel.com> Subject: Re: [RFC PATCH v4 03/27] x86/fpu/xstate: Enable XSAVES system states From: Yu-cheng Yu To: Peter Zijlstra Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Tue, 25 Sep 2018 10:23:57 -0700 In-Reply-To: <20180925170355.GD30146@hirez.programming.kicks-ass.net> References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-4-yu-cheng.yu@intel.com> <20180925170355.GD30146@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, 2018-09-25 at 19:03 +0200, Peter Zijlstra wrote: > On Fri, Sep 21, 2018 at 08:03:27AM -0700, Yu-cheng Yu wrote: > > diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c > > index 4bd56079048f..9f51b0e1da25 100644 > > --- a/arch/x86/kernel/fpu/core.c > > +++ b/arch/x86/kernel/fpu/core.c > > @@ -365,8 +365,13 @@ void fpu__drop(struct fpu *fpu) > > */ > > static inline void copy_init_user_fpstate_to_fpregs(void) > > { > > + /* > > + * Only XSAVES user states are copied. > > + * System states are preserved. > > + */ > > if (use_xsave()) > > - copy_kernel_to_xregs(&init_fpstate.xsave, -1); > > + copy_kernel_to_xregs(&init_fpstate.xsave, > > + xfeatures_mask_user); > > By my counting, that doesn't qualify for a line-break, it hits 80. > > If you were to do this line-break, coding style would have you liberally > sprinkle {} around. Ok, will fix it.