x86, microcode, AMD: Rewrite patch application procedure
authorBorislav Petkov <borislav.petkov@amd.com>
Wed, 1 Aug 2012 14:16:13 +0000 (16:16 +0200)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 22 Aug 2012 23:16:29 +0000 (16:16 -0700)
commit2efb05e8e9fa3510044e007b90263c73b6a83f84
tree7d291afac4924c6e4e75801a36b691a5073515e6
parenta3eb3b4da106a23b5d41bf915726172e31654a65
x86, microcode, AMD: Rewrite patch application procedure

Limit the access to userspace only on the BSP where we load the
container, verify the patches in it and put them in the patch cache.
Then, at application time, we lookup the correct patch in the cache and
use it.

When we need to reload the userspace container, we do that over the
reload interface:

echo 1 > /sys/devices/system/cpu/microcode/reload

which reloads (a possibly newer) container from userspace and applies
then the newest patches from there.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1344361461-10076-13-git-send-email-bp@amd64.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/microcode_amd.c