RE: [PATCH v2] x86/cpufeature: Add feature dependency checks
From: H. Peter Anvin
Date: Wed Oct 30 2024 - 22:00:23 EST
On October 30, 2024 4:44:59 PM PDT, "Luck, Tony" <tony.luck@xxxxxxxxx> wrote:
>> +void filter_feature_dependencies(struct cpuinfo_x86 *c)
>> +{
>> + const struct cpuid_dep *d;
>> +
>> + for (d = 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. Should there be
>a pr_warn() to give some clue that Linux papered over this problem?
>
>-Tony
>
Not necessarily. Linux is free to impose restrictions that don't necessarily match the hardware thermometers. For example, letting LAM depend on LASS.