If you’re passing through a USB controller or an HBA with kernel 4.15 or later, you may have noticed some issues. Many have been unable to use their passthrough VM due to a kernel oops. If you’ve fallen victim to these issues, then we’re going to show you how to solve it.
Read Also: Why We Still Recommend the GT 710
After updating from 4.14 to 4.15, users are experiencing issues when passing through USB controllers. The VFIO subreddit community opened a bug report hoping for a quick resolution. All that was known is this affected multiple people and happened sometime in between 4.14 and 4.15. Furthermore, it seems to only be affecting those who are trying to pass a controller or HBA.
The Work Around
While in contact with the kernel developers to solve this problem, VFIO Redditor Tiny4579 discovered the commit that was causing his issue. The conflicting patch is designed to free the virt_device and its debugfs_private member together, instead of separately. This patch causes a kernel oops while trying to reassign a USB controller or USB HBA to the virtual machine. After community testing, reversing the patch was confirmed to solve the issue for multiple people.
To download the patch you can click here and save with whatever filename you prefer. To apply, you will need to be in the directory of your extracted Linux kernel and use the command below.
patch -p1 -R < /path/to/usbtest.patch
After patching you can compile the kernel and should no longer experience issues.
The kernel developers are aware that this is an issue and are working to resolve it. Until this is fixed upstream, you will need to apply this patch, in reverse, to your kernel before compiling. Hopefully this is resolved rather quickly. We will provide an update as soon as an official fix is merged. If you need help compiling your kernel in Debian you can check out our guide.
Images Courtesy Pixabay