lkml.org 
[lkml]   [2015]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 3.18.2 / xen 4.4.1 dom0 - microcode oops
On 01/22/2015 09:48 AM, Boris Ostrovsky wrote:
> On 01/22/2015 03:20 AM, Borislav Petkov wrote:
>> Hmm,
>>
>> and I thought we fixed all that fun. It seems not :-\
>>
>> Boris, this paravirt_enabled() thing doesn't seem to work or why are we
>> even calling microcode_exit()?
>
> Looks like something is unloading microcode driver (init scripts
> perhaps) and so we are trying to unregister device that we never
> registered (because we had early return from microcode_init() when we
> loaded it).
>
> I actually suspect the same bug would be triggered if dis_ucode_ldr is
> true on baremetal.
>
> So we need something like:
>
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -625,6 +625,9 @@ static void __exit microcode_exit(void)
> {
> struct cpuinfo_x86 *c = &cpu_data(0);
>
> + if (paravirt_enabled() || dis_ucode_ldr)
> + return 0;

Plain 'return', of course.

Alternatively, we could return an error (-EINVAL?) from microcode_init()
when either of these two conditions is true.

-boris

> +
> microcode_dev_exit();
>
> unregister_hotcpu_notifier(&mc_cpu_notifier);
>
>



\
 
 \ /
  Last update: 2015-01-22 16:01    [W:0.067 / U:2.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site