]> 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)
commit341d95bd9d8bf65645874899a23607d9eeeb7ba6
treeb1893866fc5223937f84afe43b03eb1af1964fd6
parentb5ef53eda8cadfd64c5f69fd14998aaafc76e706
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]