unable to bind to vfio-pci

Nagendra Prabhu A T nagendraprabhu.a.t at gmail.com
Tue Feb 21 17:00:15 CET 2023


HI Bruce,

Thanks for your reply.

I have removed the binding of all other ports. So , i can confirm that #2
is taken care of.

I tried using a different driver "uio_pci_generic". I still see the same
issue for that driver as well.

The problem seems to be because the write operation is not happening in
"bind" file.

Infact tried doing the following step manually. That also failed

echo sh -c 0000:51:00.0 > /sys/bus/pci/drivers/uio_pci_generic/bind bash:
echo: write error: No such device

I have required permission for the file.
I tried doing with "sudo"
I dont have selinux running

So not sure whats blocking me. Infact , even "cat
/sys/bus/pci/drivers/uio_pci_generic/bind"
is failing

Can you please help.

Thanks
Nagendra

Thanks
Nagendra

On Tue, Feb 21, 2023 at 8:15 PM Bruce Richardson <bruce.richardson at intel.com>
wrote:

> On Tue, Feb 21, 2023 at 08:05:20PM +0530, Nagendra Prabhu A T wrote:
> >    Hi All,
> >    I am trying to bind vfio-pci using dpdk-devbind.py, But i am seeing
> teh
> >    following error :
> >    root at nat-kvm:/usr/src/dpdk-22.11/usertools# dpdk-devbind.py
> >    --bind=vfio-pci 0000:51:00.0 Error: bind failed for 0000:51:00.0 -
> >    Cannot bind to driver vfio-pci: [Errno 22] Invalid argument
> >    root at nat-kvm:/usr/src/dpdk-22.11/usertools#
> >    I see that Sarosh has faced the same issue earlier. I saw the mail
> >    thread and followed all the steps mentioned there. But it dint help.
> >    Can you please help.
>
> An error like that I would attribute to one of two possible likely causes.
> [There may be other causes, but these two come to mind immediately].
>
> 1. No IOMMU available for use. In this case you need to enable no-iommu
>    mode for VFIO and see if that works.
> 2. You have other ports on the same card bound to a kernel driver. You
>    cannot use one port bound to the kernel (and therefore using IOMMU
>    mappings for the kernel), while another port on the same card is bound
>    to userspace vfio (and therefore looking for userspace IOMMU mappings).
>    If this is the case, you need to unbind the other port from the kernel,
>    and leave it unbound or else also bound to vfio. It's possible that
>    no-iommu mode may help here too, but I have never tested that.
>
> Regards,
> /Bruce
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230221/7890c578/attachment-0001.htm>


More information about the dev mailing list