Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Paolo Bonzini
On 28/07/2015 16:25, Marc-André Lureau wrote: > > Can the inline function stay in util/memfd.c? > I see little benefits in that, only the qemu_memfd_alloc helpers would > then be exported. Then the inline is probably unnecessary if moved in > the memfd.c. That's just a matter of taste, I agree.

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 1:50 PM, Paolo Bonzini wrote: > Can the inline function stay in util/memfd.c? I see little benefits in that, only the qemu_memfd_alloc helpers would then be exported. Then the inline is probably unnecessary if moved in the memfd.c. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Paolo Bonzini
On 28/07/2015 12:58, Marc-André Lureau wrote: > Hi > > On Tue, Jul 28, 2015 at 10:11 AM, Paolo Bonzini wrote: >>> >>> What's defining all these macros? >> >> They're in asm/unistd.h. >> >> I think that, instead of making qemu/osdep.h the new qemu-common.h, the >> wrappers added by patch 3 shoul

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 10:11 AM, Paolo Bonzini wrote: >> >> What's defining all these macros? > > They're in asm/unistd.h. > > I think that, instead of making qemu/osdep.h the new qemu-common.h, the > wrappers added by patch 3 should be declared in a new header > qemu/memfd.h. The implementa

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Paolo Bonzini
On 23/07/2015 17:25, Michael S. Tsirkin wrote: > > +#ifdef CONFIG_LINUX > > + > > +#ifndef F_LINUX_SPECIFIC_BASE > > +#define F_LINUX_SPECIFIC_BASE 1024 > > +#endif > > + > > +#ifndef F_ADD_SEALS > > +#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) > > +#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-23 Thread Michael S. Tsirkin
On Thu, Jul 23, 2015 at 03:36:39AM +0200, Marc-André Lureau wrote: > Implement memfd_create() fallback if not available in system libc. > memfd_create() is still not included in glibc today, atlhough it's been > available since Linux 3.17 in Oct 2014. > > memfd has numerous advantages over traditi

[Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-22 Thread Marc-André Lureau
Implement memfd_create() fallback if not available in system libc. memfd_create() is still not included in glibc today, atlhough it's been available since Linux 3.17 in Oct 2014. memfd has numerous advantages over traditional shm/mmap for ipc memory sharing with fd handler, which we are going to m