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.