Thread (15 messages) 15 messages, 6 authors, 2018-05-01

Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2018-04-05 14:54:42
Also in: lkml

On Thu, Apr 05, 2018 at 08:09:30PM +0530, Anshuman Khandual wrote:
On 04/05/2018 04:26 PM, Anshuman Khandual wrote:
quoted
There are certian platforms which would like to use SWIOTLB based DMA API
for bouncing purpose without actually requiring an IOMMU back end. But the
virtio core does not allow such mechanism. Right now DMA MAP API is only
selected for devices which have an IOMMU and then the QEMU/host back end
will process all incoming SG buffer addresses as IOVA instead of simple
GPA which is the case for simple bounce buffers after being processed with
SWIOTLB API. To enable this usage, it introduces an architecture specific
function which will just make virtio core front end select DMA operations
structure.

Signed-off-by: Anshuman Khandual <redacted>
+ "Michael S. Tsirkin" [off-list ref]
I'm confused by this.

static bool vring_use_dma_api(struct virtio_device *vdev)
{
        if (!virtio_has_iommu_quirk(vdev))
                return true;


Why doesn't setting VIRTIO_F_IOMMU_PLATFORM on the
hypervisor side sufficient?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help