Re: [PATCH] perf/x86: check ucode before disabling PEBS on SandyBridge

Peter Zijlstra
2012-06-08T13:56:27Z

On Fri, 2012-06-08 at 15:51 +0200, Borislav Petkov wrote:
>
> In these cases, you already have PEBS fixed but since you're not loading
> any ucode, you won't run intel_snb_verify_ucode().
>
> So, you want to check for PEBS twice (and for all other features fixed
> by ucode and tested for earlier than the ucode loader, for that matter):
>
> * once when perf inits
>
> * twice, a bit later when the ucode loader has loaded something from
> userspace and the notifier corrects it.

> static __init void intel_sandybridge_quirk(void)
> {
> + intel_snb_verify_ucode();
> + /*
> + * we're still single threaded, so while there's a hole here,
> + * you can't trigger it.
> + */
> + microcode_notifier(intel_snb_ucode_notifier);
> }

Like that you mean?