diff options
| author | Nick Terrell <[email protected]> | 2022-10-24 12:09:07 -0700 |
|---|---|---|
| committer | Nick Terrell <[email protected]> | 2022-10-24 12:09:07 -0700 |
| commit | ead3243df4483304555454e38afe6e52afed33cd (patch) | |
| tree | 45f389d765b8222ea46c93ebdc3de14aae2bf0c8 /arch/x86/kernel/cpu/microcode/amd.c | |
| parent | 14e77332e74603efab8347c89d3cda447c3b97c9 (diff) | |
| parent | 247f34f7b80357943234f93f247a1ae6b6c3a740 (diff) | |
Merge branch 'main' into zstd-next
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/amd.c')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/amd.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index e7410e98fc1f..3a35dec3ec55 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -440,7 +440,13 @@ apply_microcode_early_amd(u32 cpuid_1_eax, void *ucode, size_t size, bool save_p return ret; native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); - if (rev >= mc->hdr.patch_id) + + /* + * Allow application of the same revision to pick up SMT-specific + * changes even if the revision of the other SMT thread is already + * up-to-date. + */ + if (rev > mc->hdr.patch_id) return ret; if (!__apply_microcode_amd(mc)) { @@ -528,8 +534,12 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax) native_rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); - /* Check whether we have saved a new patch already: */ - if (*new_rev && rev < mc->hdr.patch_id) { + /* + * Check whether a new patch has been saved already. Also, allow application of + * the same revision in order to pick up SMT-thread-specific configuration even + * if the sibling SMT thread already has an up-to-date revision. + */ + if (*new_rev && rev <= mc->hdr.patch_id) { if (!__apply_microcode_amd(mc)) { *new_rev = mc->hdr.patch_id; return; |