The Linux 6.18 kernel is bringing a new patch to benefit those using the decade-old AMD Bulldozer processors and wanting to Linux’s X86_NATIVE_CPU build option for enhancing performance in some areas by optimizing the kernel build for your particular processor/ISA capabilities.
Reported over the summer were various kernel errors when building the Linux kernel on a Gentoo box running atop an aging AMD FX-8350 processor and using the X86_NATIVE_CPU option for maximizing performance. Ultimately the errors came down to the XOP instruction set supported by AMD Bulldozer processors. The XOP instructions weren’t properly handled by the Linux kernel and are only found with AMD Bulldozer processors and not newer AMD Zen CPUs or Intel processors.
Google engineer Masami Hiramatsu authored a patch to add support for decoding the AMD XOP prefix encoded instructions:
“Support decoding AMD’s XOP prefix encoded instructions.
These instructions are introduced for Bulldozer micro architecture, and not supported on Intel’s processors. But when compiling kernel with CONFIG_X86_NATIVE_CPU on some AMD processor (e.g. -march=bdver2), these instructions can be used.”
XOP brought a subset of intended SSE5 capabilities to AMD Bulldozer CPUs.
That patch for instruction decoding of XOP instructions on AMD Bulldozer CPUs is submitted ahead of the Linux 6.18 merge window via this x86/misc pull request. In turn with Linux 6.18 you will be able to happily build a X86_NATIVE_CPU kernel on AMD Bulldozer systems without issue.