Microsoft Reworks The "DXGKRNL" Driver It Wants To Get Into The Linux Kernel

Written by Michael Larabel in Microsoft on 13 January 2022 at 05:38 AM EST. 127 Comments
MICROSOFT
Back in 2020 Microsoft announced the DXGKRNL driver as the kernel driver component for supporting GPU accelerated use-cases within Windows Subsystem for Linux (WSL2). That original DXGKRNL driver was quickly shot down by upstream kernel developers and various issues raised while now for the past year Microsoft has been reworking this kernel driver and on Wednesday published the new version.

DXGKRNL is their "DirectX" kernel driver component for use with Windows Subsystem for Linux (WSL2) to support graphics accelerated and GPU computing within that Hyper-V based environment. DXGKRNL is also to be used by their forthcoming Windows Subsystem for Android (WSA). DXGKRNL serves as the driver for virtual Hyper-V compute devices, principally GPUs but could be extended to other AI/ML accelerators and the like from a Windows host. OpenGL, Vulkan, OpenCL, OpenVINO, oneAPI, and CUDA are among the APIs intended to work off DXGKRNL when used with supported user-space libraries/components.


The new version of DXGKRNL addresses issues raised by upstream code reviewers during the prior round of the patches. Microsoft has also better completed its vGPU/compute hardware virtualization support code. The patches were also "rebuilt from ground up" and organized more effectively than the prior patches.


Microsoft was also originally criticized with DXGKRNL since it relied upon closed-source CUDA and DirectX user-space components for operation. To that they now are celebrating the open-source user-space API support offered by Intel with their OpenCL / OpenVINO / oneAPI support atop this kernel driver for use with Intel graphics hardware.

The patch series cover letter notes, "Between the Intel compute runtime project and libdxg, we now have a fully open source implementation of our virtualized compute stack inside of WSL. We will continue to support both open source user-space API against our compute abstraction as well as closed source one (CUDA, DX12), leaving it to the API owners and partners to decide what makes the most sense for them."

The updated Microsoft DXGKRNL patch series can be found on the kernel mailing list. So far Greg Kroah-Hartman has commented on the new patches with a number of technical issues to address while we wait to see if this Microsoft kernel driver stands chances in 2022 for making its way to the mainline kernel for something just benefiting Windows Subsystem for Linux / Windows Subsystem for Android atop Microsoft Windows hosts.

Just counting the DXKGRNL portion and not any user-space work, the kernel driver is 16.8k lines of new code.
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