LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	andi@firstfloor.org, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] fix GART to respect device's dma_mask about virtual mappings
Date: Tue, 16 Sep 2008 18:20:29 +0200	[thread overview]
Message-ID: <20080916162029.GD25711@one.firstfloor.org> (raw)
In-Reply-To: <20080916155211.GW24392@amd.com>

On Tue, Sep 16, 2008 at 05:52:11PM +0200, Joerg Roedel wrote:
> On Tue, Sep 16, 2008 at 10:20:40PM +0900, FUJITA Tomonori wrote:
> > On Tue, 16 Sep 2008 02:54:32 +0200
> > Andi Kleen <andi@firstfloor.org> wrote:
> > 
> > > FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> writes:
> > > 
> > > > Currently, gart IOMMU ignores device's dma_mask when it does virtual
> > > > mappings. So it could give a device a virtual address that the device
> > > > can't access to.
> > > 
> > > Huh? That is what the need_iommu() logic in gart_map_sg()
> > > does. An I'm not aware of any bugs in this area.
> > 
> > What the need_iommu() does is seeing if GART needs to do virtual
> > mappings or not.
> > 
> > (After need_iommu() checking) What this patchset does is to guarantee
> > that GART provides a virtual address that a device can access to.
> > 
> > 
> > > Did you actually see that failure in practice? I don't see
> > > how it could happen.
> > 
> > No, I did not. This patchset does the right thing theoretically, I
> > think, but if such problem never happens for GART, I'll drop the patch
> > for GART. Joerg?
> 
> I am not aware of any failures which are fixed by these patches. 

AFAIK all subsystems deal with it on their own. That is because i386
is the same (no remapping pci_map_* at all) and subsystems are usually 
written to i386 semantics.

> But in
> theory there could be failures.

They will stay failures because GFP_DMA bouncing can not be really
done today in the pci_map_* layer. With a lot of effort you could
probably fix all that, but I doubt it would be worth the effort for
the few devices left with DMA masks < 32bit. 

-Andi

> 
> Joerg
> 
> -- 
>            |           AMD Saxony Limited Liability Company & Co. KG
>  Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
>  System    |                  Register Court Dresden: HRA 4896
>  Research  |              General Partner authorized to represent:
>  Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
>            | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
> 

-- 
ak@linux.intel.com

      reply	other threads:[~2008-09-16 16:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 10:42 FUJITA Tomonori
2008-09-12 10:42 ` [PATCH 1/3] add iommu_device_max_index IOMMU helper function FUJITA Tomonori
2008-09-12 10:42   ` [PATCH 2/3] add dma_get_mask " FUJITA Tomonori
2008-09-12 10:42     ` [PATCH 3/3] x86: make GART to respect device's dma_mask about virtual mappings FUJITA Tomonori
2008-09-12 14:52       ` Joerg Roedel
2008-09-12 15:11         ` FUJITA Tomonori
2008-09-14 14:45 ` [PATCH 0/3] fix " Ingo Molnar
2008-09-16  0:54 ` Andi Kleen
2008-09-16 13:20   ` FUJITA Tomonori
2008-09-16 13:43     ` Andi Kleen
2008-09-16 17:13       ` FUJITA Tomonori
2008-09-16 17:58         ` Andi Kleen
2008-09-16 23:53           ` FUJITA Tomonori
2008-09-17  0:24             ` Andi Kleen
2008-09-17 19:20               ` FUJITA Tomonori
2008-09-18 18:20                 ` Andi Kleen
2008-09-18 22:15                   ` FUJITA Tomonori
2008-09-19  0:44                     ` Andi Kleen
2008-09-22 19:12                       ` FUJITA Tomonori
2008-09-22 20:35                         ` Andi Kleen
2008-09-23  4:02                           ` FUJITA Tomonori
2008-09-17 10:43             ` Ingo Molnar
2008-09-18 18:25               ` Andi Kleen
2008-09-16 15:52     ` Joerg Roedel
2008-09-16 16:20       ` Andi Kleen [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=20080916162029.GD25711@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --subject='Re: [PATCH 0/3] fix GART to respect device'\''s dma_mask about virtual mappings' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).