[vfio-users] qemu input and proper device recognition

thibaut noah thibaut.noah at gmail.com
Fri May 13 09:18:54 UTC 2016


2016-05-13 10:41 GMT+02:00 Gerd Hoffmann <kraxel at redhat.com>:
>
> Possibly.  In case the mouse presents itself as multifunction usb device
> it'll show up with multiple devices on the host.  Maybe there is a
> separate keyboard device for 1-6 kbd-style keys.
>

hum, didn't thought of that, i will have to check on my host system

>
> > Or is it directly related with how qemu deals with thoses devices?
>
> That is a limitation too.  There are two fundamental options:  We can
> either assign the device to the guest, or we can have qemu handle it and
> forward input events.  The former (aka usb-host) has the advantage that
> the guest has full control over the device.  The later (aka input-linux)
> has the advantage that qemu will actually see the events and it is
> possible to react on hotkeys to switch the device between guest and
> host.  But the guest wouldn't see the real device then, events are sent
> using emulated ps/2 kbd+mouse (or whatever emulated devices you have
> configured).  And of course we can't send button events for buttons not
> present on a ps/2 mouse.
>
> Isn't it possible to have something hybrid?
I'm thinking software kvm switch.
The main problem with usb-host is when synergy on guest os fails to launch
or when you have an issue with your guest os.
If that happens you are force to unplug devices to get them on host os
again and then pass them back to the guest via virsh attach.
While for input-linux apparently some "fancy" gamer devices can have
features tricky to  emulate.

Isn't possible to implement something at qemu-kvm level that would require
like a kvm switch, switching devices like input-linux but with devices
passed completly to the host.
I actually don't know if the host os can somehow track what is going on
inside the guest hum :/

It is nice to understand how things actually works, i had no idea of what
was emulated.

>
> > Also to note, the device is not recognize properly so i cannot use
> > razer synapse on the windows guest system.
>
> See above, that can't work with input-linux as the guest doesn't see the
> device in the first place.
>

Makes sense, thanks.

>
> cheers,
>   Gerd
>
> Meanwhile i found myself in a tricky situation because of gamers related
stuff, the best solution for now might be to buy a cheap kvm switch if i
can found one,
instead of pluging-unpluging usb devices (which can damage usb ports) i
usually reboot on native windows but it is cumbersome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160513/5dff3645/attachment.htm>


More information about the vfio-users mailing list