Intel's ENQCMD For Linux Ready To Be Re-Enabled - No Longer "Broken Beyond Repair"

Written by Michael Larabel in Intel on 15 February 2022 at 03:05 PM EST. 4 Comments
INTEL
Last June the Linux kernel disabled support for Intel's ENQCMD instructions as the kernel support was found to be "broken beyond repair" for this feature that's part of the Data Streaming Accelerator with upcoming Xeon Scalable "Sapphire Rapids" processors. Fortunately, now in time for Sapphire Rapids ramping up, Intel engineers have fixed up the ENQCMD code and looks like the next Linux kernel cycle will re-enable the functionality.

ENQCMD is a new Intel instruction that can be used for atomically submitting a work descriptor to a device, or more generally is "enqueue command" for writing commands to "enqueue registers" special device registers accessed using MMIO. See the Intel reference guide for more details and the Linux kernel documentation around Shared Virtual Addressing.


ENQCMD/ENQCMDS being introduced with Sapphire Rapids. Image from the Intel programming reference guide.


Last year the ENQCMD kernel support code was force-disabled for being too broken. Then in September a set of patches were posted for improving the Linux code around ENQCMD and a new version in December. Since then we haven't heard much on the ENQCMD Linux front until today when it's now been picked up by the all important TIP Git code.

The important milestone to now report on is the various patches to re-enable ENQCMD were queued today into the x86/pasid branch of TIP and as part of that PASID (Process Address Space ID) fixes.


Linux is preparing to re-enable ENQCMD support.


So assuming no more issues with the code being uncovered in the next few weeks, it will likely be sent in by Borislav Petkov come the Linux 5.18 merge window in late March. Linux 5.18 in turn should be out as stable in late May, roughly around the time we will see Xeon Scalable "Sapphire Rapids" ramping up. Thankfully at least Intel engineers got the original ENQCMD kernel changes out well enough ahead of time that the code could still be fixed up prior to hardware launch, with Intel generally being quite good with getting their Linux/open-source software support for new ISA features baked into the kernel and other components well ahead of time.
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