Re: [PATCH v7] Add udmabuf misc device

From: Gert Wollny
Date: Mon Sep 10 2018 - 10:17:58 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.
>
> Note the memory is specified twice, once with -m, once for the
> memory-backend-memfd object. The two must match of course (or, to be
> exact, the sum of all memory backends must match the total memory,
> but unless you want create a virtual numa machine there is no reason
> to have multiple memory-backends).
Qemu actually complained when it was not the same.

>
> > Are there any host kernel configuration parameters or features that
> > I should set (apart from enabling udmabuf)?
>
> I'm not aware of any unusual parameters required. My config is based
> on rhel-7, then stripped down with localmodconfig, then enabled the
> bits I want in my test kernel.
I use Gentoo and my kernel is rather stripped down ...

>
> Oh, wait, CONFIG_MEMFD_CREATE could be the one. I guess I should add
> a Kconfig dependency.
This was enabled, so not sure what else could be missing, I guess I'll
have to add some logging to get an idea.

Best,
Gert