All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Borislav Petkov <bp@alien8.de>, James Dingwall <james@dingwall.me.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 3.18.2 / xen 4.4.1 dom0 - microcode oops
Date: Thu, 22 Jan 2015 09:53:04 -0500	[thread overview]
Message-ID: <54C10ED0.1010302@oracle.com> (raw)
In-Reply-To: <54C10DB6.2050708@oracle.com>

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);
>
>


  reply	other threads:[~2015-01-22 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  5:52 Linux 3.18.2 / xen 4.4.1 dom0 - microcode oops James Dingwall
2015-01-22  8:20 ` Borislav Petkov
2015-01-22 14:48   ` Boris Ostrovsky
2015-01-22 14:53     ` Boris Ostrovsky [this message]
2015-01-22 15:30       ` Borislav Petkov
2015-01-22 17:43         ` James Dingwall
2015-01-22 17:58           ` Borislav Petkov
2015-01-22 18:09             ` Boris Ostrovsky
2015-01-27 22:12         ` Borislav Petkov
2015-01-27 22:55           ` Boris Ostrovsky
2015-01-27 23:12             ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C10ED0.1010302@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=james@dingwall.me.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.