]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_ring: Support DMA APIs
authorAndy Lutomirski <luto@kernel.org>
Wed, 3 Feb 2016 05:46:36 +0000 (21:46 -0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 2 Mar 2016 15:01:57 +0000 (17:01 +0200)
commite007c04b19bc167806aa4fc10041d9bd2a4baf43
treeb1893866fc5223937f84afe43b03eb1af1964fd6
parent9d6aebf68834abe776a26069d8aa3637a5b0f4f9
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>
drivers/virtio/Kconfig
drivers/virtio/virtio_ring.c
tools/virtio/linux/dma-mapping.h [new file with mode: 0644]