From: Andrew Rybchenko <arybchenko@solarflare.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Alejandro Lucero <alejandro.lucero@netronome.com>
Subject: Re: [dpdk-dev] vfio: failed to select IOMMU type
Date: Tue, 4 Apr 2017 19:10:39 +0300 [thread overview]
Message-ID: <f022afca-f12c-a00a-af09-99cda11320e7@solarflare.com> (raw)
In-Reply-To: <C6ECDF3AB251BE4894318F4E451236978220D7FC@IRSMSX109.ger.corp.intel.com>
On 04/04/2017 06:52 PM, Burakov, Anatoly wrote:
> Hi Andrew,
>
>> I think a key to the main problem is the same IOMMU group used for both PCI functions.
>> It tries to set IOMMU type using the same file descriptor twice. The second set is dummy, since the same value is set, but still fails, I guess, because it is already in use.
>> See logs with debug enabled and few extra logs below:
> Yes you're right. Specifically, eal_vfio.c:vfio_setup_device() at line 311 (where we check for number of groups) - the code always assumes that one
> active group means we've just initialized a new group, which may not necessarily be the case if there's more than one device per group.
>
> Alejandro, please correct me if I'm wrong, but I think this raises another issue: vfio_release_device() seems to attempt to close group fd unconditionally,
> which is probably a bad idea if there are more than one device per group.
If it is true, please, care about it.
> Would you be so kind to come up with a patch to fix this oversight, or should I do it? :)
Please, take a look at http://dpdk.org/dev/patchwork/patch/23202/
Basically it just moves IOMMU type set under previous container-not-set
condition.
Also my testing is very restricted, no hotplug, no different IOMMU groups.
Andrew.
next prev parent reply other threads:[~2017-04-04 16:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-01 10:46 Andrew Rybchenko
2017-04-03 16:11 ` Burakov, Anatoly
2017-04-04 15:29 ` Andrew Rybchenko
2017-04-04 15:52 ` Burakov, Anatoly
2017-04-04 16:10 ` Andrew Rybchenko [this message]
2017-04-04 16:20 ` Burakov, Anatoly
2017-04-05 7:15 ` Alejandro Lucero
2017-04-05 7:12 ` Alejandro Lucero
2017-04-06 9:10 ` Burakov, Anatoly
2017-04-18 11:22 ` Alejandro Lucero
2017-04-24 9:09 ` 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=f022afca-f12c-a00a-af09-99cda11320e7@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=alejandro.lucero@netronome.com \
--cc=anatoly.burakov@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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).