Hello, all Recently I met some issue in vfio, and below is some root cause:
Before running vpp, I will use "dpdk-devbind.py" to bind the NIC to vfio-pci, and then use "uio-driver auto" configure, and it once worked well, but it has problem recently, so I took a look at this to resolve the problem. I found that vpp has some problem to "auto" detect the uio-driver to be vfio, and the bug info is below: 1) vlib_pci_bind_to_uio is dependent vlib_pci_get_device_info to tell iommu_group 2) vlib_pci_get_device_info will check whether lvm->container_fd == -1 In my case, lvm->container_fd is initialized to be "-1", and there is no chance to modify it, so in the eye of vlib_pci_bind_to_uio, iommu_group is -1, then it will try to enable noiommu mode. If some kernel enabled NOIOMMU, then vfio can continue work with noiommu mode, but if not, then this device will be rejected due to "no VFIO" support. (pci.c # 411. ) The solution is to drop "auto" mode, and explicitly configure "vfio-pci" in the configuration, but I hope the default "auto" mode can be smarter. Ping
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11791): https://lists.fd.io/g/vpp-dev/message/11791 Mute This Topic: https://lists.fd.io/mt/28877871/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-