From: ebiederm@xmission.com (Eric W. Biederman)
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: fujita.tomonori@lab.ntt.co.jp,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86 swiotlb: Verify we can perform the remapping requested.
Date: Mon, 24 Oct 2011 08:07:31 -0700 [thread overview]
Message-ID: <m1ty6yig24.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20111021004031.GB13687@phenom.dumpdata.com> (Konrad Rzeszutek Wilk's message of "Thu, 20 Oct 2011 20:40:31 -0400")
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> writes:
> On Mon, Oct 17, 2011 at 02:19:18PM -0700, Eric W. Biederman wrote:
>>
>> Recently I had a driver try with a peculiar 2G dma memory limit.
>> It failed in weird and strange ways because my bounce buffers were
>> being allocated above 2G where the driver could not reach, and
>> no error was reported when the mappings were setup.
>
> OK, so the overflow buffer was used instead.. which presumarily
> also was allocated above the 2G? That seems to point that
> alloc_bootmem_low_pages is not doing its job?
I just looked alloc_bootmem_low_pages allocates memory below
ARCH_ADDRESS_LIMIT which for everything except s390 is 4G.
I know I was mostly using the amd gart driver. So I may be mistaken
that the swiotlb driver had the same issue. However my only solution
at the time was to boot with mem=2G. So I believe the swiotlb did
have this issue.
Mostly the patch was. Hmm. That looks stupid not wiring up the
swiotlb address space limit check when someone has already written it.
>> Use the swiotlb_dma_supported to avoid silent problems like this
>> in the future.
>
> Which driver was it that had this limit?
An unmerged driver. The driver has since been fixed to use it's
hardware in a way that doesn't hit this limit.
At the time that I looked drivers in the kernel with a dma limit
above 16MB and blow 4GB only existed on exotic architectures in
very special cases.
Unfortunately I no longer have access to this hardware to test with.
Eric
next prev parent reply other threads:[~2011-10-24 15:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 21:19 [PATCH 1/2] x86 swiotlb: Verify we can perform the remapping requested Eric W. Biederman
2011-10-17 21:20 ` [PATCH 2/2] x86 amd_gart_64: " Eric W. Biederman
2011-10-24 10:07 ` Joerg Roedel
2011-11-11 15:31 ` Joerg Roedel
2011-11-11 18:59 ` Eric W. Biederman
2011-11-12 9:02 ` Joerg Roedel
2011-10-21 0:40 ` [PATCH 1/2] x86 swiotlb: " Konrad Rzeszutek Wilk
2011-10-24 15:07 ` Eric W. Biederman [this message]
2011-10-27 0:01 ` FUJITA Tomonori
2011-10-27 6:10 ` Eric W. Biederman
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=m1ty6yig24.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hpa@zytor.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 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.