From: Dave Jiang <dave.jiang@intel.com>
To: Logan Gunthorpe <logang@deltatee.com>,
Kit Chow <kchow@gigaio.com>, Eric Pilmore <epilmore@gigaio.com>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
Alex Williamson <alex.williamson@redhat.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>
Subject: Re: IOAT DMA w/IOMMU
Date: Fri, 10 Aug 2018 10:01:56 -0700 [thread overview]
Message-ID: <6525fa4d-7d9b-0136-7206-f8351230af46@intel.com> (raw)
In-Reply-To: <0f653f8f-c7ae-831d-e238-2742590d9ea1@deltatee.com>
On 08/10/2018 09:33 AM, Logan Gunthorpe wrote:
>
>
> On 10/08/18 10:31 AM, Dave Jiang wrote:
>>
>>
>> On 08/10/2018 09:24 AM, Logan Gunthorpe wrote:
>>>
>>>
>>> On 10/08/18 10:02 AM, Kit Chow wrote:
>>>> Turns out there is no dma_map_resource routine on x86. get_dma_ops
>>>> returns intel_dma_ops which has map_resource pointing to NULL.
>>>
>>> Oh, yup. I wasn't aware of that. From a cursory view, it looks like it
>>> shouldn't be too hard to implement though.
>>>
>>>> Will poke around some in the intel_map_page code but can you actually
>>>> get a valid struct page for a pci bar address (dma_map_single calls
>>>> virt_to_page)? If not, does a map_resource routine that can properly
>>>> map a pci bar address need to be implemented?
>>>
>>> Yes, you can not get a struct page for a PCI bar address unless it's
>>> mapped with ZONE_DEVICE like in my p2p work. So that would explain why
>>> dma_map_single() didn't work.
>>>
>>> This all implies that ntb_transport doesn't work with DMA and the IOMMU
>>> turned on. I'm not sure I've ever tried that configuration myself but it
>>> is a bit surprising.
>>
>> Hmm....that's surprising because it seems to work on Skylake platform
>> when I tested it yesterday with Intel NTB. Kit is using a Haswell
>> platform at the moment I think. Although I'm curious if it works with
>> the PLX NTB he's using on Skylake.
>
> Does that mean on Skylake the IOAT can bypass the IOMMU? Because it
> looks like the ntb_transport code doesn't map the physical address of
> the NTB MW into the IOMMU when doing DMA...
Or if the BIOS has provided mapping for the Intel NTB device
specifically? Is that a possibility? NTB does go through the IOMMU.
next prev parent reply other threads:[~2018-08-10 17:01 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 18:14 IOAT DMA w/IOMMU Eric Pilmore
2018-08-09 18:43 ` Bjorn Helgaas
2018-08-09 18:51 ` Eric Pilmore
2018-08-09 19:35 ` Logan Gunthorpe
2018-08-09 19:47 ` Kit Chow
2018-08-09 20:11 ` Logan Gunthorpe
2018-08-09 20:57 ` Kit Chow
2018-08-09 21:11 ` Logan Gunthorpe
2018-08-09 21:47 ` Kit Chow
2018-08-09 22:40 ` Jiang, Dave
2018-08-09 22:48 ` Kit Chow
2018-08-09 22:50 ` Logan Gunthorpe
2018-08-09 23:00 ` Kit Chow
2018-08-10 16:02 ` Kit Chow
2018-08-10 16:23 ` Kit Chow
2018-08-10 16:24 ` Logan Gunthorpe
2018-08-10 16:24 ` Logan Gunthorpe
2018-08-10 16:31 ` Dave Jiang
2018-08-10 16:33 ` Logan Gunthorpe
2018-08-10 17:01 ` Dave Jiang [this message]
2018-08-10 17:15 ` Logan Gunthorpe
2018-08-10 17:46 ` Dave Jiang
2018-08-11 0:53 ` Kit Chow
2018-08-11 2:10 ` Logan Gunthorpe
2018-08-13 14:23 ` Kit Chow
2018-08-13 14:59 ` Robin Murphy
2018-08-13 15:21 ` Kit Chow
2018-08-13 23:30 ` Kit Chow
2018-08-13 23:39 ` Logan Gunthorpe
2018-08-13 23:48 ` Kit Chow
2018-08-13 23:50 ` Logan Gunthorpe
2018-08-14 13:47 ` Kit Chow
2018-08-14 14:03 ` Robin Murphy
2018-08-13 23:36 ` Kit Chow
2018-08-09 21:31 ` Eric Pilmore
2018-08-09 21:36 ` Logan Gunthorpe
2018-08-16 17:16 ` Kit Chow
2018-08-16 17:21 ` Logan Gunthorpe
2018-08-16 18:53 ` Kit Chow
2018-08-16 18:56 ` Logan Gunthorpe
2018-08-21 23:18 ` Eric Pilmore
2018-08-21 23:20 ` Logan Gunthorpe
2018-08-21 23:28 ` Eric Pilmore
2018-08-21 23:35 ` Logan Gunthorpe
2018-08-21 23:45 ` Eric Pilmore
2018-08-21 23:53 ` Logan Gunthorpe
2018-08-21 23:59 ` Eric Pilmore
2018-08-21 23:30 ` Eric Pilmore
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=6525fa4d-7d9b-0136-7206-f8351230af46@intel.com \
--to=dave.jiang@intel.com \
--cc=alex.williamson@redhat.com \
--cc=dwmw2@infradead.org \
--cc=epilmore@gigaio.com \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=kchow@gigaio.com \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
/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).