[vfio-users] Why Windows response so late to USB mouse cursor in VFIO VM?

Acewind acewind at gmail.com
Mon Jun 10 04:44:07 UTC 2019


My Enviroment:
OS: Ubuntu 18.04
Kernel: 4.15.0-51-generic
SeaBIOS: 1.10.2-1ubuntu1

I have successfully run an Win7 libvirt instance on Intel i3-7130U Ubuntu
18.04 host with IGD card passthrough by VFIO in legacy mode.

Aslo I need to passthrough the USB mouse and keyboard to the Windows VM. I
tried passthrough only mouse/keyboard device with:

    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x1c4f'/>
        <product id='0x0002'/>
        <address bus='1' device='3'/>
      </source>
      <alias name='hostdev5'/>
      <address type='usb' bus='0' port='1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x093a'/>
        <product id='0x2521'/>
        <address bus='1' device='2'/>
      </source>
      <alias name='hostdev6'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>


And also tried to passthrough whole xhci usb controller to Windows VM with:

<hostdev mode='subsystem' type='pci' managed='no'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
      </source>
      <alias name='hostdev5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b'
function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='no'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x2'/>
      </source>
      <alias name='hostdev6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c'
function='0x0'/>
</hostdev>


But there're same problems that after Windows powered on with mouse cursor
displayed on the screen, I need to wait for 5~10 seconds to move the mouse
cursor and use the keyboard shortcut keys.

It seems that USB mouse/keyboard only can be used after USB mouse/keyboard
drivers are loaded in Windows VM? Or the qemu SeaBIOS does not support USB
mouse/keyboard?

The qemu commandline part of my libvirt.xml:

  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.hostdev0.x-igd-opregion=on'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.hostdev0.x-igd-gms=1'/>
    <qemu:arg value='-bios'/>
    <qemu:arg value='/usr/share/seabios/bios.bin'/>
    <qemu:arg value='-chardev'/>
    <qemu:arg value='file,id=seabios,path=/tmp/bios.log'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-debugcon,iobase=0x402,chardev=seabios'/>
  </qemu:commandline>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20190610/e7bf9017/attachment.htm>


More information about the vfio-users mailing list