Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4051256imm; Tue, 25 Sep 2018 10:28:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV602Irlt51Yi0RrM41mJ4TvTXZhogy/P+/iasrFq+w97LltlV1XaWbt7N4Y2DDO28uzeUBGt X-Received: by 2002:a17:902:7d88:: with SMTP id a8-v6mr2212409plm.140.1537896537969; Tue, 25 Sep 2018 10:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537896537; cv=none; d=google.com; s=arc-20160816; b=MGJ0oHt/ir3ktnhbTV39P6dPcwUgVXmH4KpHY9ocgUsROWx+ChPf0cKNBVzDg5fv6u OO+fywT2lq38e78ghY0ynBxUt+99Itrnn/HZyyPea4UTSA20SpxExZg8PMljM2PN7SyP 6nH3NIgL+6sb/AwccboPyRO/dsKiaIA4fq7GFkRC0/6T0+Z9+SlgmY4ZpFrhhSkNanEx wZ7/eMjurHLdwSGTFsKw5j4tJXp8844uyonXrmtOXlqTs8FUSUxsBX6UgllDO2ipHilS 8Zx1yWliUG/WLcnxKadLZ917BM6YTt/crrTpN7vnmfGXzGLC4taL9lfrXD8JDdvdr1mW 1/cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=XsGIhIbocy5i64WHIN6wNauJpDwg/vvgFHliz8TLZ6c=; b=KPAaio1Ud5n93njLhFAmlFNI8UZ27cITXAF286d6jwrMZYk+gD4mCmPqiYvW3LMbrh vVScGqp7u2tnQsOY2W2SdnKUkRtJE2hhjtc0W4W6Da84B+AvYkSIv1ymDY/ObKSBGPNw yt/XWfeYMy5WRM2NaVrAQApXeJFgh/vluL8v7oerGbJUdGcH/D5eXvPRCRALdH48uip8 3BazEODoBoAq563R4TFHS34Dn7t1ua7rdD9L+LSiyALMghAQmUMKhJhlX588e4254m3v WW8mdtWG/TGCWzvI3XGaFIeMRvC8O31o2JgmB/YuRhZWxGXh8aj4d1uU1oQsQggZrFd9 tkcQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si2989169plc.170.2018.09.25.10.28.42; Tue, 25 Sep 2018 10:28:57 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbeIYXhC (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.