From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: plexo rama <plexorama-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: kernel BUG at drivers/iommu/intel-iommu.c:732! , kernel 4.14.39
Date: Tue, 22 May 2018 08:22:40 -0600 [thread overview]
Message-ID: <20180522082240.7317024b@w520.home> (raw)
In-Reply-To: <CAONWS2ynv6oEnFRLmCCvLLC=XBk9qtFkugkRw6GDvBpfgbMbPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, 22 May 2018 13:30:20 +0200
plexo rama <plexorama-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi all,
>
>
> I receive the following kernel dump when trying to load QLogic qede in-tree
> driver for a dual-port
>
> *QLogic* Corp. FastLinQ QL41000 Series 10/25/40/50GbE Controller (rev 02).
> One of the ports (45:00.0) is bound to the vfio-pci driver for
> pci-passthrough to a KVM/QEMU guest. Id like to use the PF of the second
> port on the host. I've unbound the pci device (45:00.1) from vfio-pci, but when
> I modprobe qede, I receive this:
AIUI, this device does not provide a PCIe ACS capability, therefore the
kernel assumes the functions of the device are not isolated and places
them in the same IOMMU group. The vendor has also not indicated that
the PCIe functions are DMA isolated nor provided quirks to indicate any
sort of isolation. vfio-pci requires DMA isolation between users,
whether they be separate userspace instances or between kernel and
users. Via the process above, assuming 45:00.0 is in use by a user
instance when it occurs, you've compromised the isolation. Generally
the response to this is a BUG in the vfio code, but in the case of this
driver it attempts to map DMA in the probe routine and therefore
encounters a different BUG where one device within the group has a
mapping through the IOMMU API and the other is attempting to map
through the DMA API, where the domains within intel-iommu are
incompatible.
In short, the device you're using doesn't support the DMA isolation
necessary for the use case you're trying to impose on it and the kernel
protects itself by preventing it, harshly. Perhaps ask QLogic if
there's actually ACS equivalent isolation provided between PCIe
functions of the device and we can implement quirks for it. Otherwise
you'll need a separate card to use for the host. Thanks,
Alex
prev parent reply other threads:[~2018-05-22 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 11:30 kernel BUG at drivers/iommu/intel-iommu.c:732! , kernel 4.14.39 plexo rama
[not found] ` <CAONWS2ynv6oEnFRLmCCvLLC=XBk9qtFkugkRw6GDvBpfgbMbPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-22 14:22 ` Alex Williamson [this message]
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=20180522082240.7317024b@w520.home \
--to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=plexorama-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).