Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-10-16 Thread Daniel Vetter
On Wed, Oct 16, 2019 at 12:19:02PM +0900, Tomasz Figa wrote: > On Wed, Oct 9, 2019 at 12:04 AM Daniel Vetter wrote: > > > > On Tue, Oct 08, 2019 at 07:49:39PM +0900, Tomasz Figa wrote: > > > On Tue, Oct 8, 2019 at 7:03 PM Daniel Vetter wrote: > > > > > > > > On Sat, Oct 05, 2019 at 02:41:54PM

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-10-16 Thread Gerd Hoffmann
Hi, > up later when given a buffer index. But we would still need to make > the DMA-buf itself importable. For virtio-gpu I guess that would mean > returning an sg_table backed by the shadow buffer pages. The virtio-gpu driver in drm-misc-next supports dma-buf exports. cheers, Gerd

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-10-08 Thread Daniel Vetter
On Sat, Oct 05, 2019 at 02:41:54PM +0900, Tomasz Figa wrote: > Hi Daniel, Gerd, > > On Tue, Sep 17, 2019 at 10:23 PM Daniel Vetter wrote: > > > > On Thu, Sep 12, 2019 at 06:41:21PM +0900, Tomasz Figa wrote: > > > This patch is an early RFC to judge the direction we are following in > > > our

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-09-17 Thread Daniel Vetter
On Thu, Sep 12, 2019 at 06:41:21PM +0900, Tomasz Figa wrote: > This patch is an early RFC to judge the direction we are following in > our virtualization efforts in Chrome OS. The purpose is to start a > discussion on how to handle buffer sharing between multiple virtio > devices. > > On a side

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-09-13 Thread Gerd Hoffmann
Hi, > > No. DMA master address space in virtual machines is pretty much the > > same it is on physical machines. So, on x86 without iommu, identical > > to (guest) physical address space. You can't re-define it like that. > > That's not true. Even on x86 without iommu the DMA address space

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-09-13 Thread Gerd Hoffmann
Hi, > > > To seamlessly enable buffer sharing with drivers using such frameworks, > > > make the virtio-gpu driver expose the resource handle as the DMA address > > > of the buffer returned from the DMA-buf mapping operation. Arguably, the > > > resource handle is a kind of DMA address

Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API

2019-09-12 Thread Gerd Hoffmann
Hi, > To seamlessly enable buffer sharing with drivers using such frameworks, > make the virtio-gpu driver expose the resource handle as the DMA address > of the buffer returned from the DMA-buf mapping operation. Arguably, the > resource handle is a kind of DMA address already, as it is the