From: Federico Vaga <federico.vaga-VIMSii5OdOuonA0d6jMUrA@public.gmane.org>
To: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: IOMMU - DMA debugging
Date: Wed, 12 Jul 2017 19:20:43 +0200 [thread overview]
Message-ID: <4002588.18GdeEVaQi@harkonnen> (raw)
In-Reply-To: <2775295.95PBxBV1eL@harkonnen>
On Wednesday, July 12, 2017 2:15:34 PM CEST Federico Vaga wrote:
> Thank you Robin
>
> (inline comments)
>
> On Wednesday, July 12, 2017 1:10:51 PM CEST Robin Murphy wrote:
> > On 12/07/17 08:11, Federico Vaga wrote:
> > > Hello,
> > >
> > > kernel version 4.4.x
> > >
> > > I'm facing an issue with the INTEL IOMMU driver and DMA mapping. I have
> > > an
> > > Ethernet driver that uses `dma_alloc_coherent()` to allocate and map
> > > some
> > > memory for DMA transfers.
> >
> > Assuming 02:00.0 is your actual endpoint and not some upstream aliasing
> > bridge, is your driver definitely using the correct struct device
> > pointer corresponding to that for its DMA API calls?
I had a look at this point. The driver is using the device 02:08.0 (which is
the one that should use) but the errors refers to the 02:00.0. I have a rough
idea about how the IOMMU works but I do not know the details involved in the
process.
\-[0000:00]-+-00.0
+-01.0-[01-02]----00.0-[02]----08.0 <<<<<<<<<<
+-01.1-[03]----00.0
Then among all the other devices, I have this from `dmesg`
[...]
[ 2.212107] DMAR: Hardware identity mapping for device 0000:00:1f.3
[ 2.219113] DMAR: Hardware identity mapping for device 0000:03:00.0
[ 2.226118] DMAR: Hardware identity mapping for device 0000:04:00.0
[ 2.233123] DMAR: Hardware identity mapping for device 0000:04:00.1
[...]
[ 2.693295] iommu: Adding device 0000:00:1f.3 to group 22
[ 2.699350] iommu: Adding device 0000:01:00.0 to group 23
[ 2.705389] iommu: Adding device 0000:02:08.0 to group 23
[ 2.711444] iommu: Adding device 0000:03:00.0 to group 24
[ 2.717552] iommu: Adding device 0000:04:00.0 to group 25
[...]
It misses the message "Hardware identity mapping for device 0000:02:08.0". Is
it possible that there is not a valid DMAR table?
--
Federico Vaga
http://www.federicovaga.it/
next prev parent reply other threads:[~2017-07-12 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 7:11 IOMMU - DMA debugging Federico Vaga
2017-07-12 11:10 ` Robin Murphy
[not found] ` <1c0e4473-9b50-fe0c-d544-71464360ab7f-5wv7dgnIgG8@public.gmane.org>
2017-07-12 12:15 ` Federico Vaga
2017-07-12 17:20 ` Federico Vaga [this message]
2017-07-12 18:02 ` Robin Murphy
[not found] ` <9273b2ab-2648-63f7-fe0f-a4462b4e4062-5wv7dgnIgG8@public.gmane.org>
2017-07-13 8:43 ` Federico Vaga
2017-08-11 9:35 ` Federico Vaga
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=4002588.18GdeEVaQi@harkonnen \
--to=federico.vaga-vimsii5odouona0d6jmura@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=robin.murphy-5wv7dgnIgG8@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.