From f41dc39bea3ae93d7dd813f79a1dd3d9fe04d646 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Fri, 8 Sep 2023 14:54:53 +0000 Subject: [PATCH] x86/microcode/AMD: Load late on both threads too --- ...de-AMD-Load-late-on-both-threads-too.patch | 30 +++++++++++++++++++ SPECS/kernel.spec | 9 ++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 SOURCES/9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch diff --git a/SOURCES/9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch b/SOURCES/9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch new file mode 100644 index 0000000..e67ff57 --- /dev/null +++ b/SOURCES/9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch @@ -0,0 +1,30 @@ +From a32b0f0db3f396f1c9be2fe621e77c09ec3d8e7d Mon Sep 17 00:00:00 2001 +From: "Borislav Petkov (AMD)" +Date: Tue, 2 May 2023 19:53:50 +0200 +Subject: [PATCH] x86/microcode/AMD: Load late on both threads too + +Do the same as early loading - load on both threads. + +Signed-off-by: Borislav Petkov (AMD) +Cc: +Link: https://lore.kernel.org/r/20230605141332.25948-1-bp@alien8.de +--- + arch/x86/kernel/cpu/microcode/amd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c +index f14f4ea0b537..87208e46f7ed 100644 +--- a/arch/x86/kernel/cpu/microcode/amd.c ++++ b/arch/x86/kernel/cpu/microcode/amd.c +@@ -700,7 +700,7 @@ static enum ucode_state apply_microcode_amd(int cpu) + rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); + + /* need to apply patch? */ +- if (rev >= mc_amd->hdr.patch_id) { ++ if (rev > mc_amd->hdr.patch_id) { + ret = UCODE_OK; + goto out; + } +-- +2.27.0 + diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec index a657080..922c46a 100644 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -38,11 +38,11 @@ # define buildid .local %define rpmversion 4.18.0 -%define pkgrelease 477.21.2.el8_8 +%define pkgrelease 477.21.3.el8_8 %define tarfile_release 477.13.1.el8_8 # allow pkg_release to have configurable %%{?dist} tag -%define specrelease 477.21.2%{?dist} +%define specrelease 477.21.3%{?dist} %define pkg_release %{specrelease}%{?buildid} @@ -536,6 +536,7 @@ Patch1009: 1007-i2c-xgene-slimpro-Fix-out-of-bounds-bug-in-xgene_sli.patch Patch1010: 1008-perf-Fix-check-before-add_event_to_groups-in-perf_gr.patch Patch9001: 9001-x86-xen-Split-HVM-vector-callback-setup-and-interrup.patch +Patch9002: 9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch # END OF PATCH DEFINITIONS @@ -1109,6 +1110,7 @@ ApplyPatch 1007-i2c-xgene-slimpro-Fix-out-of-bounds-bug-in-xgene_sli.patch ApplyPatch 1008-perf-Fix-check-before-add_event_to_groups-in-perf_gr.patch ApplyPatch 9001-x86-xen-Split-HVM-vector-callback-setup-and-interrup.patch +ApplyPatch 9002-x86-microcode-AMD-Load-late-on-both-threads-too.patch ApplyOptionalPatch linux-kernel-test.patch @@ -2713,6 +2715,9 @@ fi # # %changelog +* Fri Sep 08 2023 Andrew Lukoshko [4.18.0-477.21.3.el8_8] +- x86/microcode/AMD: Load late on both threads too + * Mon Aug 28 2023 Andrew Lukoshko [4.18.0-477.21.2.el8_8] - x86/xen: Split HVM vector callback setup and interrupt gate allocation