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

From: Peter Zijlstra
Date: Fri Jun 08 2012 - 09:56:22 EST


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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/