On Fri, Jun 1, 2012 at 10:31 AM, Sjur BRENDELAND
<[email protected]> wrote:
>        if (virtio_has_feature(vdev, VIRTIO_CONSOLE_USE_DMA_MEM)) {
>                dma_addr_t dma;
>                buf = dma_alloc_coherent(dev, size, &dma, GFP_KERNEL);
>        } else
>                buf = kmalloc(count, GFP_KERNEL);

Something along those lines is also needed for remote processors which
access memory via an IOMMU (e.g. OMAP4's M3 and DSP).

Allocating the memory via the DMA API will seamlessly configure the
relevant IOMMU as needed, and will make the buffers accessible to the
remote processors.

Thanks,
Ohad.
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to