<div dir="ltr">My Enviroment:<br>OS: Ubuntu 18.04<br>Kernel: 4.15.0-51-generic<br>SeaBIOS: 1.10.2-1ubuntu1<div><br>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. </div><div><br></div><div>Aslo I need to passthrough the USB mouse and keyboard to the Windows VM. I tried passthrough only mouse/keyboard device with:</div><div><br></div><div>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x1c4f'/><br>        <product id='0x0002'/><br>        <address bus='1' device='3'/><br>      </source><br>      <alias name='hostdev5'/><br>      <address type='usb' bus='0' port='1'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x093a'/><br>        <product id='0x2521'/><br>        <address bus='1' device='2'/><br>      </source><br>      <alias name='hostdev6'/><br>      <address type='usb' bus='0' port='2'/><br>    </hostdev><br></div><div><br></div><div><br>And also tried to passthrough whole xhci usb controller to Windows VM with:</div><div><br></div><div><hostdev mode='subsystem' type='pci' managed='no'><br>      <driver name='vfio'/><br>      <source><br>        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/><br>      </source><br>      <alias name='hostdev5'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/><br></hostdev><br><hostdev mode='subsystem' type='pci' managed='no'><br>      <driver name='vfio'/><br>      <source><br>        <address domain='0x0000' bus='0x00' slot='0x14' function='0x2'/><br>      </source><br>      <alias name='hostdev6'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/><br></hostdev><br></div><div><br></div><div><br>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. </div><div><br></div><div>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?</div><div><br></div><div>The qemu commandline part of my libvirt.xml:</div><div><br></div><div>  <qemu:commandline><br>    <qemu:arg value='-set'/><br>    <qemu:arg value='device.hostdev0.x-igd-opregion=on'/><br>    <qemu:arg value='-set'/><br>    <qemu:arg value='device.hostdev0.x-igd-gms=1'/><br>    <qemu:arg value='-bios'/><br>    <qemu:arg value='/usr/share/seabios/bios.bin'/><br>    <qemu:arg value='-chardev'/><br>    <qemu:arg value='file,id=seabios,path=/tmp/bios.log'/><br>    <qemu:arg value='-device'/><br>    <qemu:arg value='isa-debugcon,iobase=0x402,chardev=seabios'/><br>  </qemu:commandline><br></div><div><br></div></div>