<div dir="ltr">I can confirm that your method works nicely!<div><br></div><div>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?<br><div><br></div><div>Something to add to your guide:<br>My XHCI settings in the bios has 5 options: Smart Auto, Auto, Enabled, Disabled, Manual.</div><div>Enabled: All EHCI controllers are disabled and do not even show under a lspci</div><div>Disabled: Only ECHI controllers are visible.</div><div>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.</div><div>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.</div><div>Smart Auto: Induces a latency as it tries to determine heuristically what mode to go in. Still want to set to Manual mode.</div><div><br></div><div>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.</div><div><br></div><div>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.</div></div><div><br></div><div>Thanks for your help thus far. </div><div><br></div><div>Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 February 2016 at 20:39, Samuel Holland <span dir="ltr"><<a href="mailto:samuel@sholland.org" target="_blank">samuel@sholland.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Hello,<br>
<br>
On 02/23/2016 02:06 PM, Jonathan Scruggs wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay, I disabled xHCI in the bios and mapped all the ports. I want<br>
all 6 on Host Controller #2 to be passed through to the quest. It's<br>
00:1a.0. I select that in Libvirt, so how do I make the mask which I<br>
want permanently passed through.<br>
</blockquote>
<br></span><span class="">
You want a mask of 00 0000 1111 1111<br>
                   \_____/ \_______/<br>
                   EHCI #2  EHCI #1<br>
<br>
In hexadecimal, that's 0x00ff. If you want it to be permanent, then you<br>
can just stick the setpci command in /etc/rc.local or somewhere, and not<br>
bother with any of the toggling setup.<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There are 6 ports on Controller #2. For Controller #1, there are 10<br>
ports. However, 4 are under a hub that is on port 5. I could not<br>
find a port 6 for controller #1.<br>
</blockquote>
<br></span><span class="">
There should be exactly 8 ports on controller #1, ignoring any hubs<br>
connected downstream.<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BTW, if you have one guest, you may want to check out the patches<br>
for qemu that use your host keyboard and mouse and pass them through<br>
as a PS2/USB device and you use both ctrl keys to switch back and<br>
forth.<br>
</blockquote>
<br></span><span class="">
That sounds interesting, but my main reason for doing this is to avoid<br>
USB passthrough. I originally set this up to use the onboard Bluetooth<br>
module in Windows, with bluetooth headphones, so I could avoid audio<br>
emulation (since my monitor doesn't support audio over DVI). When I used<br>
USB passthrough, playback would stutter every minute or so; this way<br>
works flawlessly. Keyboard and mouse was an afterthought.<br>
<br></span><span class="">
-- <br>
Regards,<br>
Samuel Holland <<a href="mailto:samuel@sholland.org" target="_blank">samuel@sholland.org</a>><br>
<br></span>
_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
</blockquote></div><br></div>