public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Burt Triplett <burt@pbjtriplett.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BITS handling of CPU microcode updates
Date: Thu, 24 Mar 2011 13:53:35 -0700	[thread overview]
Message-ID: <4D8BAF4F.30609@pbjtriplett.org> (raw)
In-Reply-To: <20110324001451.GA7950@khazad-dum.debian.net>

On 03/23/2011 05:14 PM, Henrique de Moraes Holschuh wrote:
> On Mon, 21 Mar 2011, Burt Triplett wrote:
>> The Intel SDM correctly identifies microcode revision numbers as
>> signed.  However, a simple signed comparison doesn't actually
>> capture the correct logic, nor does an unsigned comparison, though
>> in both cases the problem doesn't tend to come up in common cases.
>
> ...
>
>> Tools which run automatically, without explicit user action, should
>> not attempt to load a microcode if (X<  0) and (Z>  0).  Doing so
>> makes life very difficult for people in those test lab environments:
>> they put a microcode they want to test in the BIOS or load it via
>> BITS, but then the OS driver automatically overrides it with the
>> latest production microcode.  So, tools which run automatically
>> without explicit user action should follow this rule:
>> if ((Z < 0) || (Z > 0 && X > 0 && Z > X)) load_microcode();
>
> Very well, I will send patches to fix that behaviour, as well as some
> other stuff I noticed that was not updated to match the recommended
> actions documented by the SDM and some Intel application notes.

Thanks!

Out of curiosity, which other discrepancies did you encounter?

Also, please CC me on the patch, and I'll review the changes.

>> If microcode_ctl added an option to distinguish these two cases, it
>> could apply the alternative logic when explicitly requested.
>
> Indeed, the userspace and internal kernel API don't support that at this
> time.
>
> Now, we could change them I suppose, but it doesn't look like a worthwhile
> effort to change the microcode core and APIs for something that would be
> of limited use even inside an Intel lab.

Agreed; in general such microcode will get loaded before booting Linux, 
not via the Linux microcode driver.

> Unless there is a reason to support online microcode downgrading, that is.
> Does it?  Currently, the rare case of a microcode downgrade will only
> happen at the next boot.

No, the driver doesn't need to support this case.

- Burt Triplett

  reply	other threads:[~2011-03-24 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24  5:36 [announce] Intel BIOS Implementation Test Suite (BITS) Burt Triplett
2011-03-12  2:30 ` BITS handling of CPU microcode updates Henrique de Moraes Holschuh
2011-03-21 23:44   ` Burt Triplett
2011-03-24  0:14     ` Henrique de Moraes Holschuh
2011-03-24 20:53       ` Burt Triplett [this message]
2011-03-25  0:57         ` Henrique de Moraes Holschuh
2011-03-24 21:46       ` Andi Kleen
2011-03-25  7:05         ` Burt Triplett
2011-03-25  2:09       ` x86/microcode: intel: correctly handle negative revisions Henrique de Moraes Holschuh
2011-03-25  7:14         ` Burt Triplett

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=4D8BAF4F.30609@pbjtriplett.org \
    --to=burt@pbjtriplett.org \
    --cc=hmh@hmh.eng.br \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox