On Fri, 1 Jun 2012 10:51:38 +0300, Ohad Ben-Cohen <ohad@xxxxxxxxxx> wrote: > On Fri, Jun 1, 2012 at 10:31 AM, Sjur BRENDELAND > <sjur.brandeland@xxxxxxxxxxxxxx> 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. It seems quite sensible. The formal definition in the spec would be good. In particular, defining DMA_MEM in a generic (non-Linux) way will be interesting. Thanks, Rusty. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization