From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755650AbbCMOlo (ORCPT ); Fri, 13 Mar 2015 10:41:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbbCMOlj (ORCPT ); Fri, 13 Mar 2015 10:41:39 -0400 Date: Fri, 13 Mar 2015 15:39:28 +0100 From: Oleg Nesterov To: Borislav Petkov Cc: Dave Hansen , Ingo Molnar , Andy Lutomirski , Linus Torvalds , Pekka Riikonen , Rik van Riel , Suresh Siddha , LKML , "Yu, Fenghua" , Quentin Casasnovas Subject: Re: [PATCH 2/4] x86/fpu: introduce restore_init_xstate() Message-ID: <20150313143928.GB21603@redhat.com> References: <54F74F59.5070107@intel.com> <20150311173346.GB5032@redhat.com> <20150311173429.GD5032@redhat.com> <20150313103406.GB31998@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150313103406.GB31998@pd.tnic> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13, Borislav Petkov wrote: > > > - It is not clear why we can't call setup_init_fpu_buf() unconditionally > > to always create init_xstate_buf(). > > I also don't understand what the thought behind xstate_enable_boot_cpu() > and eager_fpu_init_bp() - we do call xstate_enable_boot_cpu() and alloc > init_xstate_buf and then when we come to > > eager_fpu_init > |-> eager_fpu_init_bp > > we get to init it if not initted yet. > > When can that ever happen? This too needs cleanups. But later ;) Note that xstate_enable_boot_cpu is not called if !cpu_has_xsave, see the check in xsave_init(). Howver, eagerfpu=on will force eager_fpu_init() which calls eager_fpu_init_bp(). Btw, I was also going to kill eager_fpu_init_bp(). Probably I will send the patch today. > Applied, thanks. Thanks! Oleg.