From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751384AbdJENoq (ORCPT ); Thu, 5 Oct 2017 09:44:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34096 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbdJENop (ORCPT ); Thu, 5 Oct 2017 09:44:45 -0400 Date: Thu, 5 Oct 2017 15:44:32 +0200 (CEST) From: Thomas Gleixner To: Andi Kleen cc: x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v7 5/5] x86/xsave: Using generic CPUID clearing when disabling XSAVE In-Reply-To: <20171004234930.5685-6-andi@firstfloor.org> Message-ID: References: <20171004234930.5685-1-andi@firstfloor.org> <20171004234930.5685-6-andi@firstfloor.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Oct 2017, Andi Kleen wrote: > From: Andi Kleen > > Now that the generic CPUID clearing understands dependencies, > it's enough to clear the XSAVE CPUID bit to clear all depending > features when XSAVE gets disabled. > > So we don't need this hard to maintain explicit list > of features depending on XSAVE anymore. Just call the generic > clear_cpu_cap() function for XSAVE. This changelog is hard to read and uses terms like 'CPUID clearing'. I know what you want to say, but this is far from being precise and understandable. Aside of that the changelog violates as usual the changelog guidelines in Documentation/.... Something like this would be clear and precise: Clearing a CPU feature with setup_clear_cpu_cap() clears all features which depend on it. Expressing feature dependencies in one place is easier to maintain than keeping functions like fpu__xstate_clear_all_cpu_caps() up to date. The features which depend on XSAVE have their dependency expressed in the dependency table, so its sufficient to clear X86_FEATURE_XSAVE. Remove the explicit clearing of XSAVE dependend features. Hmm? For the code patch itself: Reviewed-by: Thomas Gleixner Thanks, tglx