]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_ring: Support DMA APIs
authorAndy Lutomirski <luto@kernel.org>
Wed, 3 Feb 2016 05:46:36 +0000 (21:46 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 23 Oct 2017 04:32:42 +0000 (21:32 -0700)
commit367b4ae2d8d78c2e924080711b909e025135a72f
tree36eff8721f8feaf66972c2f01746446923aecbac
parent1b6460d368a41a99bbdd295ac296d98c2ec96e97
virtio_ring: Support DMA APIs

virtio_ring currently sends the device (usually a hypervisor)
physical addresses of its I/O buffers.  This is okay when DMA
addresses and physical addresses are the same thing, but this isn't
always the case.  For example, this never works on Xen guests, and
it is likely to fail if a physical "virtio" device ever ends up
behind an IOMMU or swiotlb.

The immediate use case for me is to enable virtio on Xen guests.
For that to work, we need vring to support DMA address translation
as well as a corresponding change to virtio_pci or to another
driver.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 780bc7903a32edb63be138487fd981694d993610)
Orabug: 26388044
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/virtio/Kconfig
drivers/virtio/virtio_ring.c
tools/virtio/linux/dma-mapping.h [new file with mode: 0644]