* CMA in AMD IOMMU driver
[not found] <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p8>
@ 2019-06-26 4:34 ` Sathyavathi M
2019-06-26 6:58 ` Christoph Hellwig
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sathyavathi M @ 2019-06-26 4:34 UTC (permalink / raw)
To: iommu
Dear All,
This mail regarding the below communication about CMA in AMD IOMMU driver.
On Mon, Feb 02, 2015 at 10:35:36AM -0700, Alex Williamson wrote:
> [cc +joerg]
>
> On Mon, 2015-02-02 at 11:01 -0500, Mark Hounschell wrote:
> > From what I understand of CMA, and it seems provable to me, is that
> > dma_alloc_coherent allocates my 8MB buffer from CMA defined on the
> > cmdline. Without CMA specified on the cmdline, dma_alloc_coherent
> > definitely fails to allocate an 8MB contiguous buffer. From what I've
> > read about it, it is supposed to transparently "just work" when
> > dma_alloc_coherent is used?
>
> Yes, if you're running with the software iotlb (aka. bounce buffers),
> then dma_ops->alloc is x86_swiotlb_alloc_coherent(), which calls
> dma_generic_alloc_coherent(), which attempts to use CMA via
> dma_alloc_from_contiguous().
>
> If you look at the same path with AMD-Vi, dma_ops->alloc is
> amd_iommu.c:alloc_coherent(), which simply uses __get_free_pages() to
> allocate the buffer. I don't see any CMA integration along that path.
> If you were using Intel VT-d, then the buffer is again allocated with
> dma_alloc_from_contiguous() and should use CMA. This was added in
> kernel v3.16, but no corresponding AMD-Vi change was added. Joerg, this
> might be an easily fixed oversight.
Right, CMA is not yet integrated in the AMD IOMMU driver, nobody asked
fot it until now :) I will add that fall-back there for big allocations.
Joerg
Has CMA been added in AMD IOMMU driver, If yes which version of kernel has it.
Thanks in Advance.
Regards,
Sathya
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMA in AMD IOMMU driver
2019-06-26 4:34 ` CMA in AMD IOMMU driver Sathyavathi M
@ 2019-06-26 6:58 ` Christoph Hellwig
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p2>
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2019-06-26 6:58 UTC (permalink / raw)
To: Sathyavathi M; +Cc: iommu
Toms conversion of the AMD IOMMU driver to use dma-iommu adds CMA
support :)
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Re: CMA in AMD IOMMU driver
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p2>
@ 2019-06-26 9:48 ` Sathyavathi M
0 siblings, 0 replies; 5+ messages in thread
From: Sathyavathi M @ 2019-06-26 9:48 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: iommu
Dear Christoph,
Thanks for the reply.
can you please let me know which kernel has it?
Thanks,
Sathya
--------- Original Message ---------
Sender : Christoph Hellwig <hch@infradead.org>
Date : 2019-06-26 12:28 (GMT+5:30)
Title : Re: CMA in AMD IOMMU driver
To : Sathyavathi M<sathya.m@samsung.com>
CC : null<iommu@lists.linux-foundation.org>
Toms conversion of the AMD IOMMU driver to use dma-iommu adds CMA
support :)
Regards,
Sathya
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: RE: Re: CMA in AMD IOMMU driver
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p4>
@ 2019-06-27 5:55 ` Sathyavathi M
0 siblings, 0 replies; 5+ messages in thread
From: Sathyavathi M @ 2019-06-27 5:55 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: iommu
I tried to apply the patch (AMD IOMMU driver to use dma-iommu) to linux kerenl 5.1.15 but it gives me some errors.
Downloaded the patch from https://patchwork.ozlabs.org/patch/1096015/
Is this the right way im doing?
Please let me know.
Thanks,
Sathya
--------- Original Message ---------
Sender : Sathyavathi M <sathya.m@samsung.com> Engineer/Host Software /SSIR/Samsung Electronics
Date : 2019-06-26 15:21 (GMT+5:30)
Title : RE: Re: CMA in AMD IOMMU driver
To : null<hch@infradead.org>
CC : null<iommu@lists.linux-foundation.org>
Dear Christoph,
Thanks for the reply.
can you please let me know which kernel has it?
Thanks,
Sathya
--------- Original Message ---------
Sender : Christoph Hellwig <hch@infradead.org>
Date : 2019-06-26 12:28 (GMT+5:30)
Title : Re: CMA in AMD IOMMU driver
To : Sathyavathi M<sathya.m@samsung.com>
CC : null<iommu@lists.linux-foundation.org>
Toms conversion of the AMD IOMMU driver to use dma-iommu adds CMA
support :)
Regards,
Sathya
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Regards,
Sathya
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Re: CMA in AMD IOMMU driver
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p7>
@ 2019-07-01 6:19 ` Sathyavathi M
0 siblings, 0 replies; 5+ messages in thread
From: Sathyavathi M @ 2019-07-01 6:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: iommu
[-- Attachment #1.1: Type: text/html, Size: 3222 bytes --]
[-- Attachment #1.2: 201602111742151_N3WZA6X7.png --]
[-- Type: image/png, Size: 33527 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-01 6:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p8>
2019-06-26 4:34 ` CMA in AMD IOMMU driver Sathyavathi M
2019-06-26 6:58 ` Christoph Hellwig
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p2>
2019-06-26 9:48 ` Sathyavathi M
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p4>
2019-06-27 5:55 ` Sathyavathi M
[not found] ` <CGME20190626043433epcms5p84b9b6580f6c6444e69b85525863460ea@epcms5p7>
2019-07-01 6:19 ` Sathyavathi M
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.