Received: from eggs.gnu.org ([2001:4830:134:3::10]:38507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZ5i-0006yV-0k for qemu-devel@nongnu.org; Mon, 16 Sep 2013 09:43:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLZ5Z-0001VY-Oi for qemu-devel@nongnu.org; Mon, 16 Sep 2013 09:43:49 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:38779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZ5Z-0001VO-IL for qemu-devel@nongnu.org; Mon, 16 Sep 2013 09:43:41 -0400 Received: by mail-bk0-f44.google.com with SMTP id mz10so1519474bkb.17 for ; Mon, 16 Sep 2013 06:43:40 -0700 (PDT) Message-ID: <52370A95.3000103@6wind.com> Date: Mon, 16 Sep 2013 15:41:41 +0200 From: Damien Millescamps MIME-Version: 1.0 References: <1379336175-822-1-git-send-email-damien.millescamps@6wind.com> <20130916130753.GM6005@redhat.com> In-Reply-To: <20130916130753.GM6005@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RESEND] ivshmem: allow the sharing of hugepages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On 09/16/2013 03:07 PM, Daniel P. Berrange wrote: > IME this kind of auto-magical fallback behaviour is a bad idea. If we > want to support non-SHM files for the ivshmem device, then it should > be done with an explicit command line property. eg where we currently > have a 'size' and 'shm' property on the cli: > > -device ivshmem,size=24124324,shm=nameofshmobj > > it could allow an alternative 'file' property to point to a pre-created > filename > > -device ivshmem,file=/some/file/path This patch was based on the fact that in the glibc, shm_open() is nothing more than an open() with /dev/shm/ prepended to the shared memory object name. Hence, only a small modification was needed to change this behavior. Indeed, having different parameters to specify between a file and a POSIX shared memory object should be clearer for the user experience. I have reworked the patch and will send it asap. Thanks, -- Damien