Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F45CC38142 for ; Tue, 24 Jan 2023 11:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234087AbjAXLcc (ORCPT ); Tue, 24 Jan 2023 06:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234090AbjAXLc3 (ORCPT ); Tue, 24 Jan 2023 06:32:29 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F20EA39B92; Tue, 24 Jan 2023 03:32:25 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 08C221EC05DD; Tue, 24 Jan 2023 12:32:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1674559944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=isjUb0zD42c0vKguXGV/kcD/oKZFev57KCIZruGrM74=; b=GSnNzo2EDY0cvZBiO1U3MoRU0LSwwf3HEbSysCRNBFfhq4lVLlNVf71uzVl7/EmJgYoYLC lKZ8CnuXbw3fuWMJ322AwK8uewZrPIERxPGKe1JTDUtOKRe+hbWhW90SiUH6P7ugVgAbps A3Zlqpuce+CtEwPLHN9gjQ1Eo6BzfWg= Date: Tue, 24 Jan 2023 12:32:23 +0100 From: Borislav Petkov To: Reinette Chatre Cc: "Luck, Tony" , "Moger, Babu" , "corbet@lwn.net" , "tglx@linutronix.de" , "mingo@redhat.com" , "Yu, Fenghua" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "paulmck@kernel.org" , "akpm@linux-foundation.org" , "quic_neeraju@quicinc.com" , "rdunlap@infradead.org" , "damien.lemoal@opensource.wdc.com" , "songmuchun@bytedance.com" , "peterz@infradead.org" , "jpoimboe@kernel.org" , "pbonzini@redhat.com" , "Bae, Chang Seok" , "pawan.kumar.gupta@linux.intel.com" , "jmattson@google.com" , "daniel.sneddon@linux.intel.com" , "sandipan.das@amd.com" , "james.morse@arm.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bagasdotme@gmail.com" , "Eranian, Stephane" , "christophe.leroy@csgroup.eu" , "jarkko@kernel.org" , "Hunter, Adrian" , "quic_jiles@quicinc.com" , "peternewman@google.com" Subject: Re: [PATCH v11 04/13] x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag Message-ID: References: <20230109164405.569714-1-babu.moger@amd.com> <20230109164405.569714-5-babu.moger@amd.com> <5afd0a7c-3fbe-dfea-f1b4-2fc35fbb4f13@amd.com> <7d752c17-1293-ea3d-505f-046dce87c2bc@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7d752c17-1293-ea3d-505f-046dce87c2bc@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2023 at 03:43:11PM -0800, Reinette Chatre wrote: > We could make a rule that no more resctrl related features are added to > cpuinfo but I am hesitant to remove the ones that are already there. Yes, that makes sense. And note that we try for /proc/cpuinfo to contain flags where the kernel has received (substantial) enablement work to support a feature. Shadow stack would be one good example. If resctrl needs to use a feature and it cannot use that feature without kernel enablement, then yes, by all means, it should use /proc/cpuinfo and not the corresponding CPUID bit. Because the presence of the flag in /proc/cpuinfo says "yes, you can use the feature and the kernel you're running on has the required support." Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette