PCI device attachment to KVM

Hello,

I am running a KVM on BPI-R4 and I need to attach the wifi interface to it. I am getting below error:

error: unsupported configuration: host doesn't support passthrough of host PCI devices.

I’ve enabled CONFIG_IOMMU_DEFAULT_PASSTHROUGH, CONFIG_MTK_IOMMU, CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_VFIO and CONFIG_VFIO_PCI, in kernel config and rebuild image. Problem still occurs.

I am trying to attach device with below command:

virsh attach-device wifistation --file x.xml --current &

and x.xml:

<hostdev mode='subsystem' type='pci' managed='yes'>
 <source>
  <address domain='0x0000' bus='0x00' slot='0x00' function='0x0'/>
 </source>
</hostdev>

any idea?

Thanks

So I guess it is really not supported.

I would expect this as software issue (e.g. driver does not support passthrough). Because passthough means that there can be multiple requests from host and client to same device which have to be handled correctly to avoid data loss especially on nvme.

bad news, but at least i will stop looking for a solution desperately :slight_smile:

thanks!