From: Paolo Bonzini Subject: Re: [PATCH 17/23] x86/fpu: Eager switch PKRU state Date: Thu, 8 Nov 2018 12:12:52 +0100 Message-ID: <1d4b7b5c-9c3d-1ef5-3336-b7945b7978d4@redhat.com> References: <20181107194858.9380-1-bigeasy@linutronix.de> <20181107194858.9380-18-bigeasy@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: x86@kernel.org, Andy Lutomirski , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" , Rik van Riel , Dave Hansen To: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org Return-path: In-Reply-To: <20181107194858.9380-18-bigeasy@linutronix.de> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 07/11/2018 20:48, Sebastian Andrzej Siewior wrote: > index 375226055a413..5b33985d9f475 100644 > --- a/arch/x86/kernel/fpu/xstate.c > +++ b/arch/x86/kernel/fpu/xstate.c > @@ -811,7 +811,7 @@ void fpu__resume_cpu(void) > * > * Note: does not work for compacted buffers. > */ The comment is wrong, which was already the case before but it becomes a bit more important if the function is used outside its module. However, why not use get_xsave_addr? I don't see why it is important to skip the checks, and if it is it probably deserves a comment. "Raw" and double underscores in the function name is scary... Paolo > -static void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr) > +void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr) > { > if (!xfeature_enabled(xfeature_nr)) { > WARN_ON_FPU(1);