From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0DD61BD9F7 for ; Thu, 31 Oct 2024 02:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730340013; cv=none; b=jJX88XN/OQUh6t6BBUuLlxMIl4Rm8l8ceX2z6NKvQA8ZntG7Ux61v383Z2W1IQhIapwjUrHqTkjt+vyMwWeP/Z8xlN0EUx5UorM6w+k7S1vtaIN7UA8AWqtyUUQevA0ViSVNV4e/nfPgCfd+xJWCVi8/QelVvHpICQI4KEoSDVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730340013; c=relaxed/simple; bh=5/9Bf38jWpUc1sB2BMaJK5i5eHSVtQz9Hk+KmwAkHZY=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=YT207D3IpfMqD5R8jRbczp23uwieakwXKMLKfl05Al7YZRLiKqJ4graAEFYAA8IEhxF+0jgN2bq+lU+RROp06gj7LuthSZB4QfsOrcLLNjKvekI9V5P9sIpIZ/YSkVwaNagxOrK8IxTQK3Vq3TwoUgcB+iAxIwxPo6xGimCPdHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=U6/41/ts; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="U6/41/ts" Received: from [127.0.0.1] ([76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 49V1x41R1245834 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 30 Oct 2024 18:59:05 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 49V1x41R1245834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2024101701; t=1730339946; bh=BdSS5F+Lwp/NT4DvaNBs5FbYuSucnsfNLc+OHCQB+2s=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=U6/41/tsDGo4xUJUSMy0RcX3J7ZfolpHGazRatga4+R3LixtnfHsOAdyZ+v08fx5+ VNk1c2RJhJofJ7QAgb+jyphqOvqBC0aD2CEgKnG+jTmbUrzyRY5y7Spx/w3qQ9glx9 MBhHqKQ9hpFVxF5Rrx8h1avX6EdVPjdd+MBOmmJI9/XR/2H6k2Y4NlYifVbIE4lFWw scIUXvKMwBmnIXF93HbQ4vvja6CVpbxv58xUEAxQyHLOZtZAEjySt+04baKNB0dlOz q7iI61P87n85lAoXnNJVAe2vjjPba6VdxX5d/8RmURr1n1rSubm85D8HloArUADrj+ D/Sw8fWb2AmnA== Date: Wed, 30 Oct 2024 18:59:02 -0700 From: "H. Peter Anvin" To: "Luck, Tony" , "Mehta, Sohil" , "x86@kernel.org" , Borislav Petkov , Dave Hansen CC: Thomas Gleixner , Ingo Molnar , Uros Bizjak , Sandipan Das , Sean Christopherson , Peter Zijlstra , Vegard Nossum , Pawan Gupta , Nikolay Borisov , Eric Biggers , "Li, Xin3" , "Shishkin, Alexander" , Kirill Shutemov , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] x86/cpufeature: Add feature dependency checks User-Agent: K-9 Mail for Android In-Reply-To: References: <20241030233118.615493-1-sohil.mehta@intel.com> Message-ID: <84E58634-C57A-4841-BD52-2E15BD9DF592@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On October 30, 2024 4:44:59 PM PDT, "Luck, Tony" = wrote: >> +void filter_feature_dependencies(struct cpuinfo_x86 *c) >> +{ >> + const struct cpuid_dep *d; >> + >> + for (d =3D cpuid_deps; d->feature; d++) { >> + if (cpu_has(c, d->feature) && !cpu_has(c, d->depends)) >> + do_clear_cpu_cap(c, d->feature); >> + } >> +} > >The dependency check found something very wrong=2E Should there be >a pr_warn() to give some clue that Linux papered over this problem? > >-Tony > Not necessarily=2E Linux is free to impose restrictions that don't necessa= rily match the hardware thermometers=2E For example, letting LAM depend on = LASS=2E