From: Chris Wright <chrisw@sous-sol.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: chrisw@sous-sol.org, dwmw2@infradead.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] allow fallback to swiotlb on hw iommu init failures
Date: Fri, 23 Oct 2009 09:39:23 -0700 [thread overview]
Message-ID: <20091023163923.GA12883@sequoia.sous-sol.org> (raw)
In-Reply-To: <20091023145054P.fujita.tomonori@lab.ntt.co.jp>
* FUJITA Tomonori (fujita.tomonori@lab.ntt.co.jp) wrote:
> On Thu, 22 Oct 2009 18:21:58 -0700
> Chris Wright <chrisw@sous-sol.org> wrote:
>
> > This short series gives us the ability to allocate the swiotlb and then
> > conditionally free it if we discover it isn't needed. This allows us to
> > put swiotlb to use when the hw iommu fails to initialize properly.
> >
> > This needs some changes to the bootmem allocator to give the ability to
> > free reserved bootmem directly to the page allocator after bootmem is
> > torn down.
>
> The concept sounds fine but the third patch doesn't look correct.
>
> Seems that the third patch doesn't take into account enabling both hw
> iommu and swiotlb (Calgary does and I guess VT-d and AMD need that
> too).
VT-d isn't using swiotlb. Nor is AMD, although I think it will pick up
no_iommu on passthrough (seems like it would benefit from swiotlb in
that case).
> Also (iommu_detected && !dma_ops) trick doesn't work for
> Calgary, IIRC.
Yes, I think you are right. I had stared at the calgary code and thought
it would DTRT due to calgary's use of no_iommu as fallback, but instead
it will never pick up swiotlb_dma_ops. The calgary shouldn't even need
to be manually setting up nommu_dma_ops.
> The third patch also makes the dma startup code more
> complicated.
I completely agree. The whole dma/iommu startup is already complex
and fragile. Issues like above made getting the right combination
like whack-a-mole.
> I have half-baked patches to clean up the dma startup code supporting
> the concept. I can work on the top of the first and second
> patches. They need to be CC'ed to the memory people and ACKs, don't
> they?
Great.
next prev parent reply other threads:[~2009-10-23 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 1:21 [RFC PATCH 0/3] allow fallback to swiotlb on hw iommu init failures Chris Wright
2009-10-23 1:21 ` [RFC PATCH 1/3] [RFC PATCH] bootmem: refactor free_all_bootmem_core Chris Wright
2009-10-23 1:22 ` [RFC PATCH 2/3] [RFC PATCH] bootmem: add free_bootmem_late Chris Wright
2009-10-23 1:22 ` [RFC PATCH 3/3] [RFC PATCH] iommu: allow fallback to swiotlb upon hw iommu initialization failure Chris Wright
2009-10-23 5:51 ` [RFC PATCH 0/3] allow fallback to swiotlb on hw iommu init failures FUJITA Tomonori
2009-10-23 16:39 ` Chris Wright [this message]
2009-10-24 3:06 ` FUJITA Tomonori
2009-10-24 6:57 ` Chris Wright
2009-10-28 6:53 ` FUJITA Tomonori
2009-10-26 7:10 ` Andi Kleen
2009-10-26 16:26 ` Chris Wright
2009-10-26 21:56 ` Andi Kleen
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=20091023163923.GA12883@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=dwmw2@infradead.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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