Re: [PATCH v2 1/5] perf/x86/intel/lbr: use setup_clear_cpu_cap instead of clear_cpu_cap

Borislav Petkov
2022-10-20T09:00:03Z

On Wed, Sep 28, 2022 at 01:49:34PM +0300, Maxim Levitsky wrote:
> Patch 5 is the main fix - it makes the kernel to be tolerant to a
> broken CPUID config (coming hopefully from hypervisor), where you have
> a feature (AVX2 in my case) but not a feature on which this feature
> depends (AVX).

I really really don't like it when people are fixing the wrong thing.

Why does the kernel need to get fixed when something else can't get its
CPUID dependencies straight? I don't even want to know why something
would set AVX2 without AVX?!?!

Srsly.

Some of your other bits look sensible and I'd take a deeper look but
this does not make any sense. This is a hypervisor problem - not a
kernel one.

Thx.

--
Regards/Gruss,
Boris.