From: David Woodhouse <dwmw2@infradead.org>
To: Alex Williamson <alex.williamson@hp.com>
Cc: iommu@lists.linux-foundation.org,
linux-kernel <linux-kernel@vger.kernel.org>,
"Miller, Mike (OS Dev)" <mike.miller@hp.com>
Subject: Re: [PATCH] intel-iommu: Fix alloc_coherent for pass-through devices
Date: Thu, 22 Oct 2009 15:28:48 +0900 [thread overview]
Message-ID: <1256192928.2990.10.camel@macbook.infradead.org> (raw)
In-Reply-To: <1256182910.2842.36.camel@2710p.home>
On Wed, 2009-10-21 at 21:41 -0600, Alex Williamson wrote:
> After 19943b0e (intel-iommu: Unify hardware and software passthrough
> support) hardware pass-through mode devices make use of intel_dma_ops
> rather than swiotlb_dma_ops. The problem is that intel_alloc_coherent
> ignores the device coherent_dma_mask when allocating the page since it
> expects to remap the page and provide the device with an iova within the
> coherent mask. This breaks when we use pass-through.
>
> The patch below crudely works around the problem, but I hope we can come
> up with something better without reintroducing the dependency on
> swiotlb. The device hitting this problem is an HP smart array
> controller on a Proliant G6 system. It uses a default 32bit coherent
> DMA mask, and stalls, presumably waiting on control data to change in
> the wrong address space, when it gets a coherent buffer above 4G. This
> device also doesn't exactly play nice when using VT-d in anything other
> than pass-through mode, so switching it into mapped mode is not really
> an option.
I don't understand. If your device can't cope with 64-bit addresses,
then surely iommu_no_mapping() should return _false_ for it. And we'll
actually use the IOMMU even though we're generally in passthrough mode.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2009-10-22 6:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 3:41 [PATCH] intel-iommu: Fix alloc_coherent for pass-through devices Alex Williamson
2009-10-22 6:28 ` David Woodhouse [this message]
2009-10-22 12:24 ` Alex Williamson
2009-10-22 14:47 ` David Woodhouse
2009-10-22 15:00 ` FUJITA Tomonori
2009-10-22 15:01 ` Alex Williamson
2009-10-22 15:49 ` David Woodhouse
2009-11-03 23:57 ` Andrew Morton
2009-11-04 4:51 ` Alex Williamson
2009-10-22 15:49 ` David Woodhouse
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=1256192928.2990.10.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=alex.williamson@hp.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.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 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.