AMD will soon publish a new fix for the Linux kernel to allow AMD microcode updates to be updated per thread reports Michael Larabel of the website Phoronix.
The microcode for AMD CPUs added to Linux to be updated on a per-thread basis
Previously, any new processor microcodes for AMD-based CPUs had to be checked to guarantee that the open-source developers working with the company installed each physical core with the latest microcode. Not only did this leave out updates for coinciding threads for SMT processors, but it would be a lengthy process, which this new update will fix the per-thread updating within Linux.
AMD open-source developers are adding the TIP x86 and microcode branch in a soon-to-be-published patch, allowing for processor microcode loading to be processed on each logical thread. This new update will stop checking the physical component’s core level to authorize each update, which would then miss any other coinciding threads of every core.
Open-source developers discovered the microcode update during the debugging of an issue that the kernel developers were handling. Larabel reports that since July of this year, “a bug report around the lightweight profiling ‘LWP’ instructions was only being exposed on half of the CPU cores/threads for an AMD Bulldozer/Piledriver system under Linux.” He notes that LWP instructions are rarely used but can be troublesome when code is being compiled with the “-march=native” action and processed to find unusual behavior relying on whether the execution is active on a single thread with the exposed processor feature.
When AMD was working on their Spectre V2 mitigation and introducing IBPB (Indirect Branch Prediction Barrier) in the microcode, they dropped LWP from K8 and K10 processor families feature, seeing little usage.
The process is conducted per thread when the BIOS on any AMD system carries out microcode updates during the boot state. It is suggested that this is done for Microsoft Window’s benefit. AMD processor microcode updates in Linux were handled differently by only checking for a physical per-core basis and ignoring the update for the corresponding thread. With the new LWP bug report, there is proof of per-thread changes being committed. Other AMD CPU microcode updates may have also carried out per-thread improvements but have gone unnoticed until now.
News Sources: Phoronix, Linux Kerrnel,
Original Source link