On Fri, Aug 24, 2012 at 03:34:34PM +0200, Stephane Eranian wrote:
> 
> The following patch, relative to 3.6.0-rc3, makes
> the microcode update code path actually invoke the
> perf_check_microcode() function and thus potentially
> renabling SNB PEBS.
> 
> By default, CONFIG_MICROCODE_OLD_INTERFACE is
> forced to Y in arch/x86/Kconfig. There is no
> way to disable this. That means that the code
> path used in arch/x86/kernel/microcode_core.c
> did not include the call to perf_check_microcode().
> 
> Thus, even though the microcode was updated to a
> version that fixes the SNB PEBS problem, perf_event
> would still return EOPNOTSUPP when enabling precise
> sampling.
> 
> This patch simply adds a call to perf_check_microcode()
> in the call path used when OLD_INTERFACE=y.

Ok, so c93dc84cbe324 added calls to perf_check_microcode but it looks
like you're updating the microcode from /dev/cpu/microcode, correct?

And if so, the old interface got missed.

Oh well, as long as we have to support it, we might as well add that
perf call there - it will go when the interface goes anyway so until
then:

Acked-by: Borislav Petkov <[email protected]>

>
> Signed-off-by: Stephane Eranian <[email protected]>
> ---
> 
> --- a/arch/x86/kernel/microcode_core.c
> +++ b/arch/x86/kernel/microcode_core.c
> @@ -225,6 +225,9 @@ static ssize_t microcode_write(struct file *file, const 
> char __user *buf,
>       if (do_microcode_update(buf, len) == 0)
>               ret = (ssize_t)len;
>  
> +     if (ret > 0)
> +             perf_check_microcode();
> +
>       mutex_unlock(&microcode_mutex);
>       put_online_cpus();
>  
> 

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to