Received: from eggs.gnu.org ([2001:4830:134:3::10]:45509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aduOS-0002fH-H1 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 01:48:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aduOO-0008Hm-Gc for qemu-devel@nongnu.org; Thu, 10 Mar 2016 01:48:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aduOO-0008HV-Bg for qemu-devel@nongnu.org; Thu, 10 Mar 2016 01:48:16 -0500 From: Markus Armbruster References: <1457378754-21649-1-git-send-email-armbru@redhat.com> <1457378754-21649-34-git-send-email-armbru@redhat.com> <87io0v1i72.fsf@blackfin.pond.sub.org> Date: Thu, 10 Mar 2016 07:48:12 +0100 In-Reply-To: (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Thu, 10 Mar 2016 01:44:39 +0100") Message-ID: <87bn6mx1zn.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 33/42] ivshmem: Implement shm=... with a memory backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: Paolo Bonzini , cam , Claudio Fontana , QEMU , David Marchand Marc-Andr=C3=A9 Lureau writes: > Hi > > On Wed, Mar 9, 2016 at 9:59 PM, Markus Armbruster wro= te: >> The integrated memory backend has to go. >> >> Yes, my desugaring to memory-backend-file assumes Linux and the >> conventional mount point /dev/shm. >> >> For what it's worth, glibc implements shm_open() as a thin wrapper >> around open() on all targets. On Linux, it looks for other mountpoints >> when /dev/shm/ isn't there or unsuitable. On other targets, it always >> uses /dev/shm/. I didn't bother to duplicate glibc's mountpoint search, >> because distros converged to /dev/shm/ long ago. >> >> The proper way to support POSIX shared memory objects on systems where >> they're not files (and therefore can't be mapped with >> memory-backend-file) is to create memory-backend-shm. If such systems >> exist. >> >> I didn't do this now, because one, I'm not aware of a system that needs >> it, and two, ivshmem is Linux-specific anyway. ivshmem-plain could be >> made more portable, and once that's done, memory-backend-shm might >> become useful. > > How is ivshmem (the "plain" part) Linux-specific? Afaik it works on bsd t= oo. To make ivshmem-plain more portable, either add suitable #ifdefs to ivshmem.c or split ivshmem-plain off into its own file. As is, we only compile ivshmem.c with CONFIG_EVENTFD. If someone does that work, *and* any of the systems opened up by that can't do use memory-backend-file, then those systems would profit from memory-backend-shm. >> That leaves permissions. You're right, the patch changes them from 0777 >> to 0644. I'm inclined to call it a bug fix. I failed to mention it in >> my commit message, and I'll fix that. We may want to mention it in >> release notes, too. > > That's good enough for me. Okay :)