public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "joro@8bytes.org >> Joerg Roedel" <joro@8bytes.org>
To: Mark Hounschell <markh@compro.net>
Cc: iommu@lists.linux-foundation.org,
	"linux-kernel@vger.kernel.org >> Linux-kernel" 
	<linux-kernel@vger.kernel.org>
Subject: Re: IOMMU/DMA API inquiry
Date: Wed, 18 Feb 2015 19:19:01 +0100	[thread overview]
Message-ID: <20150218181901.GK29106@8bytes.org> (raw)
In-Reply-To: <54E39AF3.1090409@compro.net>

Hi Mark,

On Tue, Feb 17, 2015 at 02:48:03PM -0500, Mark Hounschell wrote:
> I understand that AMD IOMMU support is not available for 32-bit
> kernels.  I believe the INTEL IOMMU is supported there. Not knowing
> why, I was curious if that is going to remain that way?

Yes, I have no plan on making the AMD IOMMU driver available on 32bit.
But I would not be resistant to patches enabling the driver there.


> I've learned that the AMD IOMMU does not play well with the kernels
> "Contiguous Memory Allocator" (CMA). I also believe, but could be
> mistaken, that the INTEL IOMMU does. Again, not knowing why, I was
> curious if that is going to remain that way also?

No, I will queue a patch for the next merge window to enable CMA use in
the AMD IOMMU driver. So there will be support for this.


> Is the fact that the AMD IOMMU is not supported on 32 bit kernels
> the reason that dma_map_page always returns 0 on 32 bit kernels.

There is no particular reason for not supporting it on 32 bit kernels,
it just didn't seem to be important yet. At least not important enough
to justify the work.

> I've read the DMA-API-HOWTO.txt concerning dma_map_sg and at first I
> thought that maybe dma_map_sg could be used to get around the fact
> that AMD IOMMU doesn't work with CMA. But it looks as though I was
> mistaken and I would actually have to do a DMA for_each_sg(sglist,
> sg, count, i). Is that correct or can dma_map_sg somehow enable you
> to do a single DMA using a single address for the entire sglist?

The map_sg functions can't be used with the AMD IOMMU driver to work
around missing CMA support. Depending on what you want it might work
with the Intel IOMMU driver, as this one allocates a single IOVA region
for the entire sg_list.


	Joerg


  reply	other threads:[~2015-02-18 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 19:48 IOMMU/DMA API inquiry Mark Hounschell
2015-02-18 18:19 ` joro@8bytes.org >> Joerg Roedel [this message]
2015-02-19 19:41   ` Mark Hounschell

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=20150218181901.GK29106@8bytes.org \
    --to=joro@8bytes.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@compro.net \
    /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