diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-12-08 10:26:29 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-12-08 10:26:29 +0100 |
commit | e913b8cd4548cd0a407b7debd6ec9104e84d050d (patch) | |
tree | 661e543af2cab13c77b21519d49534e51e319fbd /arch/x86/kernel/cpu/microcode/amd_early.c | |
parent | 2ef84b3bb97f03332f0c1edb4466b1750dcf97b5 (diff) | |
parent | fbae4ba8c4a387e306adc9c710e5c225cece7678 (diff) |
Merge tag 'microcode_fixes_for_3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/microcode
Pull x86 microcode fixes from Borislav Petkov:
"Reload microcode when resuming and the case when only the early loader
has been utilized.
Also, do not load the driver on paravirt guests, from Boris Ostrovsky."
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/amd_early.c')
-rw-r--r-- | arch/x86/kernel/cpu/microcode/amd_early.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c index 3d988a30a21..737737edbd1 100644 --- a/arch/x86/kernel/cpu/microcode/amd_early.c +++ b/arch/x86/kernel/cpu/microcode/amd_early.c @@ -402,3 +402,21 @@ int __init save_microcode_in_initrd_amd(void) return retval; } + +void reload_ucode_amd(void) +{ + struct microcode_amd *mc; + u32 rev, eax; + + rdmsr(MSR_AMD64_PATCH_LEVEL, rev, eax); + + mc = (struct microcode_amd *)amd_ucode_patch; + + if (mc && rev < mc->hdr.patch_id) { + if (!__apply_microcode_amd(mc)) { + ucode_new_rev = mc->hdr.patch_id; + pr_info("microcode: reload patch_level=0x%08x\n", + ucode_new_rev); + } + } +} |