<div>Hello,<br></div><div>I am using VFIO with QEMU trying to passthrough my audio device.<br></div><div><br></div><div>I successfully did this operation with my previous system, with a 7th generation intel and an older kernel.<br></div><div>Now I am using a 10th generation intel and a newer kernel (5.4), and I can no longer make this work. <br></div><div><br></div><div>Looking at the QEMU code and errors, I can see that this call is failing:<br></div><div>ioctl(container->fd, VFIO_IOMMU_MAP_DMA, &map)<br></div><div>with error 22 (EINVAL).<br></div><div><br></div><div>This is the qemu log:<br></div><div>qemu-system-x86_64: -device vfio-pci,host=00:1f.3: vfio_dma_map(0x7f86fdc7c480, 0xc0000, 0x7ff40000, 0x7f83f20c0000) = -22 (Invalid argument)<br></div><div><br></div><div>I have setup my system as follows:<br></div><div>$ cat /proc/cmdline<br></div><div>BOOT_IMAGE=/vmlinuz-linux root=UUID=5b780644-8382-11e9-a363-1b71c3bf36e9 rw loglevel=3 i915.enable_psr=0 intel_iommu=on iommu=pt i915.enable_gvt=1 kvm.ignore_msrs=1 vfio-pci.ids=8086:0284,8086:02c8,8086:02a3,8086:02a4<br></div><div><br></div><div>And this is the information of my PCI layout:<br></div><div>$ lspci -s 00:1f<br></div><div>00:1f.0 ISA bridge: Intel Corporation Device 0284<br></div><div>00:1f.3 Audio device: Intel Corporation Device 02c8<br></div><div>00:1f.4 SMBus: Intel Corporation Device 02a3<br></div><div>00:1f.5 Serial bus controller [0c80]: Intel Corporation Comet Lake SPI (flash) Controller<br></div><div>$ lspci -s 00:1f -n<br></div><div>00:1f.0 0601: 8086:0284<br></div><div>00:1f.3 0403: 8086:02c8<br></div><div>00:1f.4 0c05: 8086:02a3<br></div><div>00:1f.5 0c80: 8086:02a4<br></div><div><br></div><div>I tried (just as an experiment) to bypass the error check in the QEMU code, and the virtualized audio device works as expected for a while, then it stops.<br></div><div><br></div><div>Do you know what could generate the problem? <br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div>