Hey everyone.
I just got sierra up and running as a vm, passing through GTX 970 and a keyboard and mouse individually. Now on my windows VM, I passed through the entire USB controller of my peripherals to make it easier. I've now tried to achieve the same thing with this VM, using both hostdev and the qemu args, and I'm having a weird issue. The keyboard etc work in the clover bootloader, but as soon as macOS starts booting, the controller seems to disable as the backlight of the keyboard turns off. I am then unable to use any of the devices on the controller. I have a feeling that it's a driver issue within macOS but I'm not sure what to do.
Here is my XML
<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>KJS-Mac</name>
<uuid>c8c0a4dd-415c-4692-d51b-69a3c94f71b2</uuid>
<metadata>
<vmtemplate xmlns="unraid" name="macOS" icon="/mnt/user/domains/macOS/OSX-10.12.png"/>
</metadata>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<memoryBacking>
<nosharepages/>
<locked/>
</memoryBacking>
<vcpu placement='static'>10</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<vcpupin vcpu='2' cpuset='4'/>
<vcpupin vcpu='3' cpuset='5'/>
<vcpupin vcpu='4' cpuset='6'/>
<vcpupin vcpu='5' cpuset='7'/>
<vcpupin vcpu='6' cpuset='8'/>
<vcpupin vcpu='7' cpuset='9'/>
<vcpupin vcpu='8' cpuset='10'/>
<vcpupin vcpu='9' cpuset='11'/>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-q35-2.5'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/etc/libvirt/qemu/nvram/c8c0a4dd-415c-4692-d51b-69a3c94f71b2_VARS-pure-efi.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>Penryn</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/local/sbin/qemu</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='writeback'/>
<source file='/mnt/cache/vdisk1.img'/>
<backingStore/>
<target dev='hdc' bus='sata'/>
<alias name='sata0-0-2'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pcie.0'/>
</controller>
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
<model name='i82801b11-bridge'/>
<alias name='pci.1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
</controller>
<controller type='pci' index='2' model='pci-bridge'>
<model name='pci-bridge'/>
<target chassisNr='2'/>
<alias name='pci.2'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:51:66:48'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='e1000-82545em'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
</interface>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
</memballoon>
</devices>
<seclabel type='none' model='none'/>
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=04:00.1,bus=root.1,addr=00.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.2'/>
<qemu:arg value='-device'/>
<qemu:arg value='isa-applesmc,osk=xxxxxxxx'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='type=2'/>
<qemu:arg value='-cpu'/>
<qemu:arg value='Penryn,vendor=GenuineIntel'/>
</qemu:commandline>
</domain>
I don't know if this has anything to do with it, but I'm also getting these errors in the log
2016-11-26 03:42:51.134+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: KJS-Server
Domain id=2 is tainted: high-privileges
Domain id=2 is tainted: custom-argv
2016-11-26T03:42:53.081467Z qemu-system-x86_64: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
2016-11-26T03:42:54.086155Z qemu-system-x86_64: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
Any ideas would be greatly appreciated