Re: [PATCH v12 4/4] x86/cpu: Clear feature bits whose dependencies were cleared

From: Ahmed S. Darwish

Date: Mon Apr 13 2026 - 10:49:36 EST


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