From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 641D835F619 for ; Mon, 13 Apr 2026 14:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776091384; cv=none; b=tP888hBeE7N54WzGYMw9tKKm54nxbq5Cs3gkjs61/0Ewg4VP+trwwqtOAROSkqG5QXM4cQ3Y0o+pMZoQ7G/iwudiuzchUSZB4epkiP0MJxiuEU81EsUvlgSu+lNRCXY7sya1liuCAWxgkauZt2vyWlB15v1UKPVTXotzheObzAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776091384; c=relaxed/simple; bh=iK91KABG3dtAG1d9Yom1XawMqpdPn8CpQSfNfFjTaQ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ARYx6C7rjfQPGGfUInYYC/UVVBZrSEm+1QK/tm0vh/jPmJtlJOltBAJg2qavAzd91eOtU6REulH84+P7Fwefkj8RRbMZOgHPOXS4TQZuQ5+ZnJ4PyrzxTKWG7dcgj1jacQHtG0NF6NMyFF8uFTvhNYkM1LXaH7doiuMP76Hy8qQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mcSFzR0k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=L9YmBNVz; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mcSFzR0k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="L9YmBNVz" Date: Mon, 13 Apr 2026 16:42:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1776091381; 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: in-reply-to:in-reply-to:references:references; bh=N1gM3rZHNt0KE4h/+E0Y468DzKXPhxKIe6P75hbVJ5g=; b=mcSFzR0k5QAGOpSjUKfNYgQsKH/81pSiNVZxihN2ez787N+ZlFJyknXI3Iv/VCgRlD8tso g0agwR38FOpenkIyAlEVVgEax/yBfON90vFGluX4plrLJfMrC44wC4S/GOnG4u67rZGOpO urUkql/fFyGEkV2lzma35/Vg+vjn7vMDb5YzwW8vpXKRcOTh6mJvw41VU3Mw3O+UcZU+8H VOxxgyg5sIUbXyg6/Xg9CoZbEPmpn84886b3Y85x2LOKZnGID6FzCelXfqCN4oGM+3bi4L aBocuPdRYxAN+vjnOUaIkI19P5BV+XC03yg+FV7WHaZrU5pc9JBZkP/afJfGnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1776091381; 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: in-reply-to:in-reply-to:references:references; bh=N1gM3rZHNt0KE4h/+E0Y468DzKXPhxKIe6P75hbVJ5g=; b=L9YmBNVzl7xuD2lpbYkeFGMNLzGMVrI0UU+6Df2nv9p3zJuMh6LwXwTwZJsTWMJq2Uqp6+ tEOrrVVEBshFpRCw== From: "Ahmed S. Darwish" To: Maciej Wieczor-Retman Cc: "H. Peter Anvin" , bp@alien8.de, dave.hansen@linux.intel.com, xin@zytor.com, chang.seok.bae@intel.com, mingo@redhat.com, elena.reshetova@intel.com, maciej.wieczor-retman@intel.com, babu.moger@amd.com, sohil.mehta@intel.com, pawan.kumar.gupta@linux.intel.com, pmladek@suse.com, nik.borisov@suse.com, ptesarik@suse.com, tglx@kernel.org, peterz@infradead.org, jpoimboe@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v12 4/4] x86/cpu: Clear feature bits whose dependencies were cleared Message-ID: References: <48fda57397205a062b752e37e63948fa668946f7.1774623092.git.m.wieczorretman@pm.me> 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=us-ascii Content-Disposition: inline In-Reply-To: On Wed, 01 Apr 2026, Maciej Wieczor-Retman wrote: > > On 2026-03-30 at 23:41:57 +0200, Ahmed S. Darwish wrote: > >On Fri, 27 Mar 2026, H. Peter Anvin wrote: > >> > >> Thinking about it, if this is discovered at runtime, it is really too late, > >> because in a sense we have miscompiled the kernel with unwanted code (as we > >> should have compiled out these features just as with other DISABLED features.) > >> > >> This ultimately reflects a failed dependency in Kconfig.cpufeatures, which may > >> have caused kconfig to do the Wrong Thing[TM]. So at the very least it might > >> be a good thing to print a message here saying Kconfig.cpufeatures should be > >> fixed. > >> > >> The better option, which I don't know how difficult it would be, would be to > >> make the dependencies available to Kconfig. This sounds like something that > >> would fall in the scope of Ahmed's rework rather than this patchset, though > >> (Ahmed, would you agree?) > >> > > > >Definitely! > > > >If the CPUID model sent some days ago is to be merged, (*) then all these > >dependencies should be encoded within x86-cpuid-db, especially that it now > >covers all the synthetic X86_FEATURE flags as well. > > Hi! I'm still testing/browsing through the cpuid patchset. But I was wondering > what did you mean about encoding these dependencies? That they are encoded in > your patchset or that they should be? > Just for the sake of archive follow-up, further discussion moved to here: https://lore.kernel.org/lkml/adz_584vlKivaECq@lx-t490 Thanks! Ahmed