From: Joerg Roedel <joro@8bytes.org>
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>
Subject: Re: [PATCH v2] iommu/vt-d: Implement dma_[un]map_resource()
Date: Wed, 30 Jan 2019 17:23:39 +0100 [thread overview]
Message-ID: <20190130162339.d7uiqikoo7plthfs@8bytes.org> (raw)
In-Reply-To: <20190122213045.5667-1-logang@deltatee.com>
On Tue, Jan 22, 2019 at 02:30:45PM -0700, Logan Gunthorpe wrote:
> Currently the Intel IOMMU uses the default dma_[un]map_resource()
> implementations does nothing and simply returns the physical address
> unmodified.
>
> 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.
>
> 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.
>
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Joerg Roedel <joro@8bytes.org>
Applied, thanks.
prev parent reply other threads:[~2019-01-30 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 21:30 [PATCH v2] iommu/vt-d: Implement dma_[un]map_resource() Logan Gunthorpe
2019-01-29 7:37 ` Christoph Hellwig
2019-01-30 16:23 ` Joerg Roedel [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=20190130162339.d7uiqikoo7plthfs@8bytes.org \
--to=joro@8bytes.org \
--cc=dwmw2@infradead.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).