DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sarosh Arif <sarosh.arif@emumba.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] unable to bind to vfio-pci
Date: Mon, 21 Sep 2020 16:10:12 +0500
Message-ID: <CABoZmYNh0NOhepMpGdQNX34mQ1tpM_mfd4_B6nxZkNgLOxyrzQ@mail.gmail.com> (raw)
In-Reply-To: <8fa1aae5-617c-64a7-a647-fd2508e0f662@intel.com>

On Thu, Sep 17, 2020 at 4:50 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
>
> On 17-Sep-20 11:22 AM, Bruce Richardson wrote:
> > On Thu, Sep 17, 2020 at 02:21:27PM +0500, Sarosh Arif wrote:
> >> On Thu, Sep 17, 2020 at 2:17 PM Bruce Richardson
> >> <bruce.richardson@intel.com> wrote:
> >>>
> >>> On Thu, Sep 17, 2020 at 11:52:58AM +0500, Sarosh Arif wrote:
> >>>> I have been trying to bind to vfio-pci using usertools/dpdk-devbind.py
> >>>> but am unable to do so. The reason behind this is that I am unable to
> >>>> write in /sys/bus/pci/drivers/vfio-pci/bind. Upon searching solutions
> >>>> I tried a couple of things such as setting iommu=pt and intel_iommu=on
> >>>> and ensured vt-d is enabled.
> >>>> Along with this I have made sure that the vfio-pci module is correctly
> >>>> loaded. I have also tried
> >>>>
> >>>> chmod 666 /sys/bus/pci/drivers/vfio-pci/bind
> >>>>
> >>>> So that I have permissions to write in this file.
> >>>>
> >>>> The error I get when I use usertools/dpdk-devbind.py to bind is this:
> >>>> Error: bind failed for 0000:b7:00.1 - Cannot bind to driver vfio-pci
> >>>>
> >>>> The details of 0000:b7:00.1 are as follows:
> >>>> Ethernet Connection X722 for 10GBASE-T 37d2' if=eno6 drv=i40e
> >>>>
> >>>> I have also unbinded The pci bridge to which 0000:b7:00.1 was connected.
> >>>>
> >>>> What more can be done to resolve this?
> >>>>
> >>> Since you describe changing permissions on the "bind" file, are you trying
> >>> to run dpdk-devbind.py as a non-root user? Does it work as root?
> >> I am running it as a root user. It does not work as a root user.
> >
> > One possible problem that it could be, is that you will need to ensure that
> > any other ports on the same device are either similarly bound to vfio-pci
> > or not bound to any driver. You can't have e.g. a 2-port X722 NIC where one
> > port is bound to the kernel driver, while another is bound to vfio in
> > userspace.
> >
I unbinded all other ports from the kernel driver yet I could not bind
to vfio. The problem seems to be the inability to write in
/sys/bus/pci/drivers/vfio-pci/bind and
/sys/bus/pci/drivers/vfio-pci/new_id. When I manually try to echo in
these files I get "Permission denied".
>
> I don't think this would result in a bind error; rather, you'd see the
> IOMMU group as non-viable when attempting to use it with VFIO, but the
> binding itself should succeed.
>
> --
> Thanks,
> Anatoly

  reply	other threads:[~2020-09-21 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  6:52 Sarosh Arif
2020-09-17  7:31 ` Dybkowski, AdamX
2020-09-17  8:39   ` Sarosh Arif
2020-09-17  9:17 ` Bruce Richardson
2020-09-17  9:21   ` Sarosh Arif
2020-09-17  9:35     ` Burakov, Anatoly
2020-09-21 11:54       ` Sarosh Arif
2020-09-21 11:58         ` Burakov, Anatoly
2020-09-17 10:22     ` Bruce Richardson
2020-09-17 11:49       ` Burakov, Anatoly
2020-09-21 11:10         ` Sarosh Arif [this message]
2020-09-21 11:36           ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABoZmYNh0NOhepMpGdQNX34mQ1tpM_mfd4_B6nxZkNgLOxyrzQ@mail.gmail.com \
    --to=sarosh.arif@emumba.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git