Re: [PATCH 0/10] DMA-API debugging facility

From: FUJITA Tomonori
Date: Fri Nov 21 2008 - 22:31:35 EST


On Fri, 21 Nov 2008 18:45:51 +0100
Ingo Molnar <mingo@xxxxxxx> wrote:

>
> * Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
>
> > On Fri, Nov 21, 2008 at 05:24:29PM +0000, David Woodhouse wrote:
> > > On Fri, 2008-11-21 at 18:20 +0100, Joerg Roedel wrote:
> > > > Ok, I will move the generic bits to lib/ and include/linux and let
> > > > architectures decide if they want to use it.
> > >
> > > Once you've done that, I'll try to hook it up on PowerPC to make
> > > sure it works there.
> >
> > Ok, cool. Thanks
>
> i'll give it a whirl on x86 once the allocation bug is resolved. x86
> testing will be the most interesting in practice, because most drivers
> there are developed with no dynamic DMA in mind. (many of the x86
> drivers were developed before IOMMUs were supported in Linux)

Yeah, one of the problems due to this is that some drivers wrongly
assume that the dma mapping operations never fail (they do DMA with a
wrong address). With VT-d and AMD IOMMU, the dma mapping operations
fail just because of OOM.

Some time ago, I hooked the fault injection mechanism to the dma
mapping operations (I linked struct fault_attr to struct pci_dev so
you can make dma_map_single/sg fail with a particular pci device). It
might interest some people:

git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git dmafault
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/