* [pve-devel] [PATCH pve-kernel] cherry-pick fix for new amd64 ucode
@ 2023-09-25 17:23 Stoiko Ivanov
2023-09-26 9:38 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2023-09-25 17:23 UTC (permalink / raw)
To: pve-devel
The latest amd64-microcode package in sid [0] (which probably will
eventually make it to bookworm-security) has a change that requires
the added patch to work properly.
The changelog-entry refers to stable k.o branches only - but a quick
look through the linux-firmware.git log identifies:
`f2eb058afc57348cde66852272d6bf11da1eef8f` as relevant commit, which
refers (as NOTE in the patch) to:
a32b0f0db3f3 ("x86/microcode/AMD: Load late on both threads too")
which applies cleanly (although I cherry-picked the patch from the
6.1.y stable branch to have the original commit in the commit message).
quickly tested compiling and booting the result in a VM (however w/o
a fitting CPU (Epyc Genoa or Bergamo) it should cause a change)
reported in our Enterprise Support as potential culprit for one
thread from 128 being reported as offline in `lscpu`
[0] https://metadata.ftp-master.debian.org/changelogs//non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230808.1.1_changelog
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
...de-AMD-Load-late-on-both-threads-too.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 patches/kernel/0018-x86-microcode-AMD-Load-late-on-both-threads-too.patch
diff --git a/patches/kernel/0018-x86-microcode-AMD-Load-late-on-both-threads-too.patch b/patches/kernel/0018-x86-microcode-AMD-Load-late-on-both-threads-too.patch
new file mode 100644
index 000000000000..7f62eac2efd1
--- /dev/null
+++ b/patches/kernel/0018-x86-microcode-AMD-Load-late-on-both-threads-too.patch
@@ -0,0 +1,32 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Borislav Petkov (AMD)" <bp@alien8.de>
+Date: Tue, 2 May 2023 19:53:50 +0200
+Subject: [PATCH] x86/microcode/AMD: Load late on both threads too
+
+commit a32b0f0db3f396f1c9be2fe621e77c09ec3d8e7d upstream.
+
+Do the same as early loading - load on both threads.
+
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Cc: <stable@kernel.org>
+Link: https://lore.kernel.org/r/20230605141332.25948-1-bp@alien8.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+(cherry picked from commit 94a69d6999419cd21365111b4493070182712299)
+Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
+---
+ 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 ac59783e6e9f..53f21fb431c0 100644
+--- a/arch/x86/kernel/cpu/microcode/amd.c
++++ b/arch/x86/kernel/cpu/microcode/amd.c
+@@ -705,7 +705,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.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH pve-kernel] cherry-pick fix for new amd64 ucode
2023-09-25 17:23 [pve-devel] [PATCH pve-kernel] cherry-pick fix for new amd64 ucode Stoiko Ivanov
@ 2023-09-26 9:38 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-09-26 9:38 UTC (permalink / raw)
To: Proxmox VE development discussion, Stoiko Ivanov
Am 25/09/2023 um 19:23 schrieb Stoiko Ivanov:
> The latest amd64-microcode package in sid [0] (which probably will
> eventually make it to bookworm-security) has a change that requires
> the added patch to work properly.
>
> The changelog-entry refers to stable k.o branches only - but a quick
> look through the linux-firmware.git log identifies:
> `f2eb058afc57348cde66852272d6bf11da1eef8f` as relevant commit, which
> refers (as NOTE in the patch) to:
> a32b0f0db3f3 ("x86/microcode/AMD: Load late on both threads too")
> which applies cleanly (although I cherry-picked the patch from the
> 6.1.y stable branch to have the original commit in the commit message).
>
> quickly tested compiling and booting the result in a VM (however w/o
> a fitting CPU (Epyc Genoa or Bergamo) it should cause a change)
>
> reported in our Enterprise Support as potential culprit for one
> thread from 128 being reported as offline in `lscpu`
>
> [0] https://metadata.ftp-master.debian.org/changelogs//non-free-firmware/a/amd64-microcode/amd64-microcode_3.20230808.1.1_changelog
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> ...de-AMD-Load-late-on-both-threads-too.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 patches/kernel/0018-x86-microcode-AMD-Load-late-on-both-threads-too.patch
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-26 9:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 17:23 [pve-devel] [PATCH pve-kernel] cherry-pick fix for new amd64 ucode Stoiko Ivanov
2023-09-26 9:38 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal