2012-08-17 14:30:53

by Borislav Petkov

[permalink] [raw]
Subject: [GIT PULL] x86, microcode, AMD: Per-family patches cache

Hi guys,

please pull, thanks.

The following changes since commit d9875690d9b89a866022ff49e3fcea892345ad92:

Linux 3.6-rc2 (2012-08-16 14:51:24 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/microcode-updates-for-3.7

for you to fetch changes up to cd692919bed1d59a440ffaed585ebc3c9d8c3406:

x86, microcode, AMD: Rewrite patch application procedure (2012-08-17 14:17:42 +0200)

----------------------------------------------------------------
Per-family patches cache

This patch set adds code for caching all microcode patches which belong
to the current family on which we're running. We look up the patch
needed for each core from the cache at application time instead of
holding a single patch per-system.

Also, a bunch of fixes/cleanups precede the meat in the last 3.

Patchset has been tested on all families which are supported by the
microcode loader ( >= 0x10).

----------------------------------------------------------------
Andreas Herrmann (1):
x86, microcode, AMD: Fix broken ucode patch size check

Borislav Petkov (11):
x86, microcode: Save an indentation level in reload_for_cpu
x86, microcode: Drop uci->mc check on resume path
x86, microcode: Cleanup cpu hotplug notifier callback
x86, microcode: Straighten out Kconfig text
x86, microcode, AMD: Remove useless get_ucode_data wrapper
x86, microcode, AMD: Check before applying a patch
x86, microcode, AMD: Read CPUID(1).EAX on the correct cpu
x86, microcode: Add a refresh firmware flag to ->request_microcode_fw
x86, microcode, AMD: Add reverse equiv table search
x86, microcode, AMD: Add a small, per-family patches cache
x86, microcode, AMD: Rewrite patch application procedure

arch/x86/Kconfig | 20 +--
arch/x86/include/asm/microcode.h | 10 +-
arch/x86/kernel/microcode_amd.c | 356 ++++++++++++++++++++++++--------------
arch/x86/kernel/microcode_core.c | 67 +++----
arch/x86/kernel/microcode_intel.c | 3 +-
5 files changed, 273 insertions(+), 183 deletions(-)



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


2012-08-20 23:23:25

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On 08/17/2012 07:30 AM, Borislav Petkov wrote:
> Hi guys,
>
> please pull, thanks.
>
> The following changes since commit d9875690d9b89a866022ff49e3fcea892345ad92:
>
> Linux 3.6-rc2 (2012-08-16 14:51:24 -0700)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/microcode-updates-for-3.7
>
> for you to fetch changes up to cd692919bed1d59a440ffaed585ebc3c9d8c3406:
>
> x86, microcode, AMD: Rewrite patch application procedure (2012-08-17 14:17:42 +0200)
>

Hmmm... this isn't actually present on git.kernel.org, and 01/12 is
missing from your "v0" patchset on LKML (nevermind that a "v0"
designator screams "don't apply"...)

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

2012-08-21 09:16:53

by Borislav Petkov

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On Mon, Aug 20, 2012 at 04:23:09PM -0700, H. Peter Anvin wrote:
>> git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/microcode-updates-for-3.7
>>
> Hmmm... this isn't actually present on git.kernel.org, and 01/12
> is missing from your "v0" patchset on LKML (nevermind that a "v0"
> designator screams "don't apply"...)

Hmm, that's actually the tag and it is there:

http://git.kernel.org/?p=linux/kernel/git/bp/bp.git;a=tag;h=334a50f04aab22cb03c59e3ff333fe81a531a85c

I tried this locally, here's what I did:

$ git remote add bp git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git

$ git fetch bp
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
>From git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
* [new branch] for-next -> bp/for-next
* [new branch] master -> bp/master
* [new tag] l3-fix-for-3.5 -> l3-fix-for-3.5
* [new tag] mce-fix-for-3.4 -> mce-fix-for-3.4
* [new tag] microcode-fix-for-3.4 -> microcode-fix-for-3.4

$ git fetch --tags bp
remote: Counting objects: 155, done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 118 (delta 92), reused 17 (delta 15)
Receiving objects: 100% (118/118), 22.42 KiB, done.
Resolving deltas: 100% (92/92), completed with 20 local objects.
>From git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
* [new tag] amd-rdmsr-cleanups-for-3.6 -> amd-rdmsr-cleanups-for-3.6
* [new tag] microcode-updates-for-3.7 -> microcode-updates-for-3.7

$ git checkout -b test-merge tip/master
Checking out files: 100% (108/108), done.
Branch test-merge set up to track remote branch master from tip.
Switched to a new branch 'test-merge'

$ git merge microcode-updates-for-3.7
Auto-merging arch/x86/Kconfig
Merge made by the 'recursive' strategy.
arch/x86/Kconfig | 20 +++---
arch/x86/include/asm/microcode.h | 10 +--
arch/x86/kernel/microcode_amd.c | 356 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------
arch/x86/kernel/microcode_core.c | 67 ++++++++++----------
arch/x86/kernel/microcode_intel.c | 3 +-
5 files changed, 273 insertions(+), 183 deletions(-)

So I think you need to fetch the tags with "git fetch --tags" - this is
why I had to fetch a second time above... I seem to remember this being
the case in other pull requests, btw.

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

2012-08-22 21:53:14

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On 08/20/2012 04:23 PM, H. Peter Anvin wrote:
> On 08/17/2012 07:30 AM, Borislav Petkov wrote:
>> Hi guys,
>>
>> please pull, thanks.
>>
>> The following changes since commit
>> d9875690d9b89a866022ff49e3fcea892345ad92:
>>
>> Linux 3.6-rc2 (2012-08-16 14:51:24 -0700)
>>
>> are available in the git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
>> tags/microcode-updates-for-3.7
>>
>> for you to fetch changes up to cd692919bed1d59a440ffaed585ebc3c9d8c3406:
>>
>> x86, microcode, AMD: Rewrite patch application procedure
>> (2012-08-17 14:17:42 +0200)
>>
>
> Hmmm... this isn't actually present on git.kernel.org, and 01/12 is
> missing from your "v0" patchset on LKML (nevermind that a "v0"
> designator screams "don't apply"...)
>

Ping again?

-hpa

2012-08-22 22:48:26

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On 08/21/2012 02:16 AM, Borislav Petkov wrote:
> On Mon, Aug 20, 2012 at 04:23:09PM -0700, H. Peter Anvin wrote:
>>> git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/microcode-updates-for-3.7
>>>
>> Hmmm... this isn't actually present on git.kernel.org, and 01/12
>> is missing from your "v0" patchset on LKML (nevermind that a "v0"
>> designator screams "don't apply"...)
>
> Hmm, that's actually the tag and it is there:
>
> http://git.kernel.org/?p=linux/kernel/git/bp/bp.git;a=tag;h=334a50f04aab22cb03c59e3ff333fe81a531a85c
>
> I tried this locally, here's what I did:
>
> $ git remote add bp git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
>
> $ git fetch bp
> remote: Counting objects: 3, done.
> remote: Compressing objects: 100% (3/3), done.
> remote: Total 3 (delta 0), reused 0 (delta 0)
> Unpacking objects: 100% (3/3), done.
> From git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
> * [new branch] for-next -> bp/for-next
> * [new branch] master -> bp/master
> * [new tag] l3-fix-for-3.5 -> l3-fix-for-3.5
> * [new tag] mce-fix-for-3.4 -> mce-fix-for-3.4
> * [new tag] microcode-fix-for-3.4 -> microcode-fix-for-3.4
>
> $ git fetch --tags bp
> remote: Counting objects: 155, done.
> remote: Compressing objects: 100% (99/99), done.
> remote: Total 118 (delta 92), reused 17 (delta 15)
> Receiving objects: 100% (118/118), 22.42 KiB, done.
> Resolving deltas: 100% (92/92), completed with 20 local objects.
> From git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
> * [new tag] amd-rdmsr-cleanups-for-3.6 -> amd-rdmsr-cleanups-for-3.6
> * [new tag] microcode-updates-for-3.7 -> microcode-updates-for-3.7
>

Weird. I have never had to git fetch --tags before...

-hpa

2012-08-22 23:26:53

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On 08/22/2012 03:48 PM, H. Peter Anvin wrote:
>
> Weird. I have never had to git fetch --tags before...
>

OK, sorted. Next complaint... please don't mix urgent (for the current
version) and non-urgent (for next) in the same pull request.

I have sorted it out, but it made things take a lot longer on my part.

-hpa

2012-08-23 09:51:36

by Borislav Petkov

[permalink] [raw]
Subject: Re: [GIT PULL] x86, microcode, AMD: Per-family patches cache

On Wed, Aug 22, 2012 at 04:26:25PM -0700, H. Peter Anvin wrote:
> On 08/22/2012 03:48 PM, H. Peter Anvin wrote:
> >
> > Weird. I have never had to git fetch --tags before...

So why did you have to fetch the tags this time?

> OK, sorted. Next complaint... please don't mix urgent (for the current
> version) and non-urgent (for next) in the same pull request.

Ok, urgent goes out as urgently as possible. Got it.

> I have sorted it out, but it made things take a lot longer on my part.

Thanks. I'd consider this whole deal done now :).

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