Re: [vfio-users] USB >>port<< passthrough
Oh this is interesting, i will definitely try this. Even if it is not exposed to libvirt we can pass custom command line parameters via xml. Thanks a lot! Rokas Kupstys On 2016.08.24 03:31, Samuel Holland wrote: > Hello, > > On 08/23/2016 02:07 AM, Rokas Kupstys wrote: >> Is it possible to pass-through USB port? I know we can pass-through >> specific usb devices or entire usb controllers however it is not >> ideal in all cases. > > Sorry for all of the not-quite-accurate answers you've gotten. You > _can_, in fact, pass through a USB port by its location: > > $ qemu-system-x86_64 -device usb-host,? 2>&1 | sort > usb-host.bootindex=int32 > usb-host.full-path=bool (on/off) > usb-host.hostaddr=uint32 > usb-host.hostbus=uint32 > usb-host.hostport=str > usb-host.isobsize=uint32 > usb-host.isobufs=uint32 > usb-host.loglevel=uint32 > usb-host.msos-desc=bool (on/off) > usb-host.pipeline=bool (on/off) > usb-host.port=str > usb-host.productid=uint32 > usb-host.serial=str > usb-host.vendorid=uint32 > > See the hostbus and hostport options. I don't know if this is exposed by > libvirt, since I don't use that, but at least qemu has support for it. > >> Is there any solution to this? > > Passing through a port using `-device usb-host,hostbus=foo,hostport=bar` > is one solution. Another solution can be to use your several integrated > USB controllers (if you have an Intel chipset). Even though all of your > devices may show up on one controller, you can change which controller > the ports are attached to in the PCI configuration space. See [1] and > the thread at [2]. > > Hope that helps, > Samuel > > [1] http://sholland.org/thoughts.html#2016-02-29 > [2] > https://www.redhat.com/archives/vfio-users/2016-February/msg00110.html > > ___ > vfio-users mailing list > vfio-users@redhat.com > https://www.redhat.com/mailman/listinfo/vfio-users > ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
Re: [vfio-users] USB >>port<< passthrough
Hello, On 08/23/2016 02:07 AM, Rokas Kupstys wrote: Is it possible to pass-through USB port? I know we can pass-through specific usb devices or entire usb controllers however it is not ideal in all cases. Sorry for all of the not-quite-accurate answers you've gotten. You _can_, in fact, pass through a USB port by its location: $ qemu-system-x86_64 -device usb-host,? 2>&1 | sort usb-host.bootindex=int32 usb-host.full-path=bool (on/off) usb-host.hostaddr=uint32 usb-host.hostbus=uint32 usb-host.hostport=str usb-host.isobsize=uint32 usb-host.isobufs=uint32 usb-host.loglevel=uint32 usb-host.msos-desc=bool (on/off) usb-host.pipeline=bool (on/off) usb-host.port=str usb-host.productid=uint32 usb-host.serial=str usb-host.vendorid=uint32 See the hostbus and hostport options. I don't know if this is exposed by libvirt, since I don't use that, but at least qemu has support for it. Is there any solution to this? Passing through a port using `-device usb-host,hostbus=foo,hostport=bar` is one solution. Another solution can be to use your several integrated USB controllers (if you have an Intel chipset). Even though all of your devices may show up on one controller, you can change which controller the ports are attached to in the PCI configuration space. See [1] and the thread at [2]. Hope that helps, Samuel [1] http://sholland.org/thoughts.html#2016-02-29 [2] https://www.redhat.com/archives/vfio-users/2016-February/msg00110.html ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
Re: [vfio-users] USB >>port<< passthrough
Just to chime in, yes and no. You can't pass a port, you can pass a single device, but it's best to pass a whole USB controller. I also picked up a USB PCIe card for vfio use, it has two USB 3.0 ports on the PCI bracket and a header for two front mounted ports, and I have labels from my Brother labeller to mark those as being the VM ports. I considered using an A/B switch like Jayme described, but ended up using a piece of software called Synergy (popular and mentioned elsewhere on the list before) to switch targets. I turn off scroll lock, I can mouse from host to guest and back (and even copy/paste), and when I hit scroll lock again, the mouse and keyboard are locked to the instance where they are currently. It works very nicely once you're used to it, it cuts down on cabling, and you can plug in a spare keyboard/mouse to connect directly to the guest if needed. On Tue, Aug 23, 2016 at 2:09 PM, Jayme Howardwrote: > You can't pass the port itself. You can pass individual devices attached > to a port, but the latency can get weird sometimes. I had pretty > significant problems when I did it that way. I opted to use Francisco's > solution above, with a slight adjustment. I have a dedicated card that > gets allocated to the VM. Connected to that, and to one of the host's USB > ports, I have a USB A/B switch. Connected to the switch is a 4 port hub. > Connected to the hub is my keyboard and mouse. All I have to do to switch > the inputs from the host to the guest and back is to choose A or B on the > switch, and a few seconds later all input is directed to the correct > location. > > On Tue, Aug 23, 2016 at 5:28 AM, Quentin Deldycke < > quentindeldy...@gmail.com> wrote: > >> Yes, it is best way. >> >> My motherboard have 2 controllers. One is all time on Linux, the other >> one move between both. >> >> Keyboard mouse on the moving one, printer and other device all time on >> Linux. >> >> On 23 Aug 2016 12:16 p.m., "Francisco Menendez" >> wrote: >> >>> If you don't mind spending a few dollars, what I did was basically buy >>> a PCIe USB port card, then give it exclusive control of the device to >>> the guest. I can't use it in the host, but I have other USB ports for >>> the host, so no biggie. >>> >>> On Tue, Aug 23, 2016 at 4:07 PM, Rokas Kupstys wrote: >>> > Is it possible to pass-through USB port? I know we can pass-through >>> > specific usb devices or entire usb controllers however it is not ideal >>> > in all cases. For instance in my case single pci device drives all usb >>> > ports on the back panel. Naturally i cant pass-through that pci device >>> > because it would leave me without access to the host. Passing through >>> > USB devices is of little use if one wishes to use kvm switch - >>> > mouse/keyboard switched to another port would still have same >>> > vendor/device ids. Is there any solution to this? >>> > >>> > -- >>> > Rokas Kupstys >>> > >>> > >>> > ___ >>> > vfio-users mailing list >>> > vfio-users@redhat.com >>> > https://www.redhat.com/mailman/listinfo/vfio-users >>> >>> ___ >>> vfio-users mailing list >>> vfio-users@redhat.com >>> https://www.redhat.com/mailman/listinfo/vfio-users >>> >> >> ___ >> vfio-users mailing list >> vfio-users@redhat.com >> https://www.redhat.com/mailman/listinfo/vfio-users >> >> > > ___ > vfio-users mailing list > vfio-users@redhat.com > https://www.redhat.com/mailman/listinfo/vfio-users > > ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
Re: [vfio-users] USB >>port<< passthrough
If you don't mind spending a few dollars, what I did was basically buy a PCIe USB port card, then give it exclusive control of the device to the guest. I can't use it in the host, but I have other USB ports for the host, so no biggie. On Tue, Aug 23, 2016 at 4:07 PM, Rokas Kupstyswrote: > Is it possible to pass-through USB port? I know we can pass-through > specific usb devices or entire usb controllers however it is not ideal > in all cases. For instance in my case single pci device drives all usb > ports on the back panel. Naturally i cant pass-through that pci device > because it would leave me without access to the host. Passing through > USB devices is of little use if one wishes to use kvm switch - > mouse/keyboard switched to another port would still have same > vendor/device ids. Is there any solution to this? > > -- > Rokas Kupstys > > > ___ > vfio-users mailing list > vfio-users@redhat.com > https://www.redhat.com/mailman/listinfo/vfio-users ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
[vfio-users] USB >>port<< passthrough
Is it possible to pass-through USB port? I know we can pass-through specific usb devices or entire usb controllers however it is not ideal in all cases. For instance in my case single pci device drives all usb ports on the back panel. Naturally i cant pass-through that pci device because it would leave me without access to the host. Passing through USB devices is of little use if one wishes to use kvm switch - mouse/keyboard switched to another port would still have same vendor/device ids. Is there any solution to this? -- Rokas Kupstys ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users