[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200428174952.GA5097@quicinc.com>
Date: Tue, 28 Apr 2020 23:19:52 +0530
From: Srivatsa Vaddagiri <vatsa@...eaurora.org>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: konrad.wilk@...cle.com, jasowang@...hat.com,
jan.kiszka@...mens.com, will@...nel.org,
stefano.stabellini@...inx.com, iommu@...ts.linux-foundation.org,
virtualization@...ts.linux-foundation.org,
virtio-dev@...ts.oasis-open.org, tsoni@...eaurora.org,
pratikp@...eaurora.org, christoffer.dall@....com,
alex.bennee@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] virtio: Add bounce DMA ops
* Michael S. Tsirkin <mst@...hat.com> [2020-04-28 12:17:57]:
> Okay, but how is all this virtio specific? For example, why not allow
> separate swiotlbs for any type of device?
> For example, this might make sense if a given device is from a
> different, less trusted vendor.
Is swiotlb commonly used for multiple devices that may be on different trust
boundaries (and not behind a hardware iommu)? If so, then yes it sounds like a
good application of multiple swiotlb pools.
> All this can then maybe be hidden behind the DMA API.
Won't we still need some changes to virtio to make use of its own pool (to
bounce buffers)? Something similar to its own DMA ops proposed in this patch?
> > +void virtio_bounce_set_dma_ops(struct virtio_device *vdev)
> > +{
> > + if (!bounce_buf_paddr)
> > + return;
> > +
> > + set_dma_ops(vdev->dev.parent, &virtio_dma_ops);
>
>
> I don't think DMA API maintainers will be happy with new users
> of set_dma_ops.
Is there an alternate API that is more preffered?
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Powered by blists - more mailing lists