From: Christoph Hellwig <hch@lst.de>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
Christoph Hellwig <hch@lst.de>,
David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH] iommu/vt-d: Implement dma_[un]map_resource()
Date: Sat, 19 Jan 2019 10:40:02 +0100 [thread overview]
Message-ID: <20190119094002.GA21653@lst.de> (raw)
In-Reply-To: <20190119000559.12784-1-logang@deltatee.com>
On Fri, Jan 18, 2019 at 05:05:59PM -0700, Logan Gunthorpe wrote:
> However, this doesn't create the IOVA entries necessary for addresses
> mapped this way to work when the IOMMU is enabled. Thus, when the
> IOMMU is enabled, drivers relying on dma_map_resource() will trigger
> DMAR errors. We see this when running ntb_transport with the IOMMU
> enabled, DMA, and switchtec hardware.
Which resources do you plan to map? At least for PCIe P2P adding
an address translation seems wrong to me.
>
> The implementation for intel_map_resource() is nearly identical to
> intel_map_page(), we just have to re-create __intel_map_single().
> dma_unmap_resource() uses intel_unmap_page() directly as the
> functions are identical.
Instead of having two tiny wrappers I'd just revert
964f2311a6862f1fbcc044d0828ad90030928b7f if we need to pass a real
physical address now.
next prev parent reply other threads:[~2019-01-19 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 0:05 [PATCH] iommu/vt-d: Implement dma_[un]map_resource() Logan Gunthorpe
2019-01-19 9:40 ` Christoph Hellwig [this message]
2019-01-19 18:46 ` Logan Gunthorpe
2019-01-21 17:42 ` Christoph Hellwig
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=20190119094002.GA21653@lst.de \
--to=hch@lst.de \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@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