[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [vfio-users] Trying to pass through USB controller.

I can confirm that your method works nicely!

Is there a kernel command line options to set this instead of using setpci? Since I want these settings to be permanent, would the USB module have this type of mask setting?

Something to add to your guide:
My XHCI settings in the bios has 5 options: Smart Auto, Auto, Enabled, Disabled, Manual.
Enabled: All EHCI controllers are disabled and do not even show under a lspci
Disabled: Only ECHI controllers are visible.
Manual: All controllers are active, but in my case, all USB devices will appear under XHCI using lsusb. This is the mode that allows an OS to manually manipulate what devices appear under the EHCI controllers.
Auto: Will dynamically switch between the above three modes. Thus to keep it from switching to full Enabled mode, you will want to set it to Manual.
Smart Auto: Induces a latency as it tries to determine heuristically what mode to go in. Still want to set to Manual mode.

Your last graph where you showed the bits and what how they align to the controller was a good help, so you will want to add that to the final howto as well. Port one of the EHCI controller #1 was on the far right. So, I think I got the hang of how to count the ports now. This leaves me another controller for another guest and I don't need to pass all the ports to.

Leaving XHCI on means that when you pass a EHCI controller, you can selectively choose the ports to be passed through. If, however, you leave XHCI completely disabled, then passing through a EHCI controller will pass all the USB ports on the controller through, and disables the use of USB3 on the host.

Thanks for your help thus far. 


On 23 February 2016 at 20:39, Samuel Holland <samuel sholland org> wrote:

On 02/23/2016 02:06 PM, Jonathan Scruggs wrote:
Okay, I disabled xHCI in the bios and mapped all the ports. I want
all 6 on Host Controller #2 to be passed through to the quest. It's
00:1a.0. I select that in Libvirt, so how do I make the mask which I
want permanently passed through.

You want a mask of 00 0000 1111 1111
                   \_____/ \_______/
                   EHCI #2  EHCI #1

In hexadecimal, that's 0x00ff. If you want it to be permanent, then you
can just stick the setpci command in /etc/rc.local or somewhere, and not
bother with any of the toggling setup.

There are 6 ports on Controller #2. For Controller #1, there are 10
ports. However, 4 are under a hub that is on port 5. I could not
find a port 6 for controller #1.

There should be exactly 8 ports on controller #1, ignoring any hubs
connected downstream.

BTW, if you have one guest, you may want to check out the patches
for qemu that use your host keyboard and mouse and pass them through
as a PS2/USB device and you use both ctrl keys to switch back and

That sounds interesting, but my main reason for doing this is to avoid
USB passthrough. I originally set this up to use the onboard Bluetooth
module in Windows, with bluetooth headphones, so I could avoid audio
emulation (since my monitor doesn't support audio over DVI). When I used
USB passthrough, playback would stutter every minute or so; this way
works flawlessly. Keyboard and mouse was an afterthought.

Samuel Holland <samuel sholland org>

vfio-users mailing list
vfio-users redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]