Re: [PATCH v7] Add udmabuf misc device

From: Gert Wollny
Date: Mon Sep 10 2018 - 12:27:00 EST


Am Montag, den 10.09.2018, 15:30 +0200 schrieb Gerd Hoffmann:
> On Mon, Sep 10, 2018 at 01:31:08PM +0200, Gert Wollny wrote:
> > Am Montag, den 10.09.2018, 12:53 +0200 schrieb Gerd Hoffmann:
> > >
> > > By default qemu doesn't use memfd for backing storage, you have
> > > to
> > > explicitly configure qemu that way (see qemu commit log of the
> > > test
> > > branch):
> > >
> > > qemu-system-x86_64 -m 2G
> > > -object memory-backend-memfd,id=ram,size=2G
> > > -numa node,memdev=ram"
> >
> > Thanks, but that doesn't seem to help.
>
With some more debugging I found

WARNING: CPU: 2 PID: 14658 at drivers/dma-buf/dma-buf.c:410
dma_buf_export+0x85/0x270 which refers to dma_buf_export:414

if (WARN_ON(!exp_info->priv
|| !exp_info->ops
|| !exp_info->ops->map_dma_buf
|| !exp_info->ops->unmap_dma_buf
|| !exp_info->ops->release
|| !exp_info->ops->map_atomic
|| !exp_info->ops->map
|| !exp_info->ops->mmap)) {
return ERR_PTR(-EINVAL);
}

Specifically, map_atomic is NULL, but as I can see from the git
version, this was removed some time ago, going to test the 4.19 rc2
kernel now,

Best,
Gert