AMD Prepares Linux For "Bus Lock Trap" Feature On Upcoming CPUs

Written by Michael Larabel in AMD on 29 April 2024 at 06:35 AM EDT. Add A Comment
AMD
An upcoming AMD micro-architecture (presumably Zen 5 given the timing and history around AMD's Linux hardware enablement...) is introducing Bus Lock Trap as a feature matching Intel's existing split/bus lock detection functionality.

Patches sent out today by AMD Linux engineers prepare for an "upcoming AMD uarch" that will support this Bus Lock Trap feature. When AMD Bus Lock Trap is enabled, it will raise an exception if a bus lock occurs outside of the kernel (above ring zero).

One of the patches does confirm that the AMD Bus Lock Trap feature "functionally works identical to Intel." Intel has long supported this split lock and bus lock functionality under Linux while now with presumably Zen 5 the support is there for AMD processors.

Several years ago Intel engineers did a lot of the Linux kernel preparations for split lock detection with their processors to warn or kill offending applications. Similarly has been the bus lock detection feature too. Both of these aim to warn/kill offending software due to performance penalties or even potential denial of service issues.

AMD64 Architecture Programmer's Manual on Bus Lock Trap


AMD's new patches build off that prior Intel split/bus lock code and adding in the AMD processor support. There is also support for Bus Lock Detect on AMD processors for software running within KVM virtual machines.

This isn't the most exciting of features for (presumably) Zen 5 but a nice minor addition for also matching the capabilities of Intel processors for allowing the kernel to better report/handle such locks for performance and denial of service reasons. On the Zen 5 micro-architecture front it's also known publicly about the notable ISA additions as confirmed with the GCC Znver5 patch. Various other Zen 5 processor enablement for the Linux kernel remains ongoing as we await to see the next-gen Ryzen and EPYC processors later this year.
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