From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [RFC PATCH v6 04/26] x86/fpu/xstate: Introduce XSAVES system states Date: Tue, 4 Dec 2018 19:16:41 +0100 Message-ID: <20181204181641.GA16705@zn.tnic> References: <20181119214809.6086-1-yu-cheng.yu@intel.com> <20181119214809.6086-5-yu-cheng.yu@intel.com> <20181204160144.GG11803@zn.tnic> <752c38422a6536d8df99b619214f935e4bc882ad.camel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <752c38422a6536d8df99b619214f935e4bc882ad.camel@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Yu-cheng Yu 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 , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pa List-Id: linux-arch.vger.kernel.org On Tue, Dec 04, 2018 at 09:08:11AM -0800, Yu-cheng Yu wrote: > Then we will do this very often. Why don't we create all three in the > beginning: xfeatures_mask_all, xfeatures_mask_user, and xfeatures_mask_system? Because the _all thing is the OR-ed product of the two and then you don't have to update it when the _user and the _system ones change because you'll be creating it on the fly each time. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.skyhub.de ([5.9.137.197]:42146 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeLDSQp (ORCPT ); Tue, 4 Dec 2018 13:16:45 -0500 Date: Tue, 4 Dec 2018 19:16:41 +0100 From: Borislav Petkov Subject: Re: [RFC PATCH v6 04/26] x86/fpu/xstate: Introduce XSAVES system states Message-ID: <20181204181641.GA16705@zn.tnic> References: <20181119214809.6086-1-yu-cheng.yu@intel.com> <20181119214809.6086-5-yu-cheng.yu@intel.com> <20181204160144.GG11803@zn.tnic> <752c38422a6536d8df99b619214f935e4bc882ad.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <752c38422a6536d8df99b619214f935e4bc882ad.camel@intel.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yu-cheng Yu 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 , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Message-ID: <20181204181641.F-HkT_0y_Il-Eotcs-qm3oLc33wGJMO3cz9a87BlDA4@z> On Tue, Dec 04, 2018 at 09:08:11AM -0800, Yu-cheng Yu wrote: > Then we will do this very often. Why don't we create all three in the > beginning: xfeatures_mask_all, xfeatures_mask_user, and xfeatures_mask_system? Because the _all thing is the OR-ed product of the two and then you don't have to update it when the _user and the _system ones change because you'll be creating it on the fly each time. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.