AMD CPU Microcode Fix For Linux To Patch Every Logical Thread Nears Mainline

Written by Michael Larabel in AMD on 18 October 2022 at 05:42 AM EDT. 4 Comments
AMD
Back in August I wrote about a patch to change AMD's CPU microcode loading on Linux to now patch every logical CPU thread rather than just per physical core. It turned out that at least some CPU microcode updates do make per-thread modifications while the Linux kernel microcode handling for AMD was just applying microcode updates at run-time on a per-core basis. That patch was seemingly forgotten about but has now been queued up as part of x86 "urgent" changes for the mainline kernel.

This summer it was discovered that some AMD CPU microcode updates do make per-thread modifications and thus the Linux kernel needs to apply microcode updates to SMT sibling threads too. This came up when encountering lightweight profiling "LWP" instruction differences among CPU cores/threads that were disabled on earlier AMD CPUs with a microcode update. The patch to make the microcode updates apply for all SMT threads was worked out and queued into TIP's x86/microcode branch in August and then seemingly forgotten about even with the recent Linux 6.1 merge window.


Longtime kernel developer Borislav Petkov has now picked up his patch again and this time put it within TIP's "x86/urgent" branch. The urgent material is sent in as part of fixes to the mainline Linux kernel. So presumably now that he's queued it in x86/urgent, this AMD microcode loading fix will land as soon as this week ahead of Linux 6.1-rc2. The patch is also marked for CC'ing to stable, which means it will also be back-ported to existing Linux kernel stable series too.

This latest revised patch in TIP x86/urgent can be found here for those interested.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week