From: ebiederm@xmission.com (Eric W. Biederman)
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: konrad.wilk@oracle.com, tglx@linutronix.de, mingo@redhat.com,
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: Wed, 26 Oct 2011 23:10:55 -0700 [thread overview]
Message-ID: <m18vo76k28.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20111027090019T.fujita.tomonori@lab.ntt.co.jp> (FUJITA Tomonori's message of "Thu, 27 Oct 2011 09:01:53 +0900")
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> writes:
> On Mon, 24 Oct 2011 08:07:31 -0700
> ebiederm@xmission.com (Eric W. Biederman) wrote:
>
>> 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.
>
> http://www.gossamer-threads.com/lists/linux/kernel/1333685?do=post_view_threaded#1333685
>
> swiotlb isn't designed to handle hardware having odd dma mask (e.g. 2G
> or something). Such device needs the own bouncing mechanism.
I have no problem with that with not supporting weird dma masks.
There is a perfectly fine method to report an unsupported dma mask
programmatically that just needs a trivial code change to be wired up.
I just want the method to be wired up on x86 so that we fail gracefully,
instead of mysteriously.
Eric
prev parent reply other threads:[~2011-10-27 6:10 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
2011-10-27 0:01 ` FUJITA Tomonori
2011-10-27 6:10 ` Eric W. Biederman [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=m18vo76k28.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.