From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anPf5-0006Z5-NK for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anPez-0003yv-Rr for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:00:47 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:36578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anPez-0003ym-LL for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:00:41 -0400 Received: by mail-qk0-x242.google.com with SMTP id e124so454815qkc.3 for ; Tue, 05 Apr 2016 05:00:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160331091452.GF32185@stefanha-x1.localdomain> References: <1458292438-13909-1-git-send-email-b.reynal@virtualopensystems.com> <20160331091452.GF32185@stefanha-x1.localdomain> Date: Tue, 5 Apr 2016 14:00:40 +0200 Message-ID: From: Baptiste Reynal Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Jani.Kokkonen@huawei.com, VirtualOpenSystems Technical Team , Claudio.Fontana@huawei.com, qemu list On Thu, Mar 31, 2016 at 11:14 AM, Stefan Hajnoczi wrote: > > On Fri, Mar 18, 2016 at 10:13:52AM +0100, Baptiste Reynal wrote: > > A new memory backend, the shared memory backend, based on > > the file memory backend. > > > > This new backend allows a master QEMU instance to share a part of > > his main memory whith a slave QEMU instance. It is then possible to load > > a firmware on this memory and trigger the slave boot using a SDM > > signal. > > > > Such new backend enables, on a master side, to allocate the whole > > memory as shareable (e.g. /dev/shm, or hugetlbfs). > > How is this different from qemu -mem-path which can be used for > hugetlbfs? A new mechanism is integrated here. This shared memory allows the slave to map dynamically only a subregion of the master memory, when with mempath the entire memory is shared. A use-case can be the use of remoteproc framework on Linux. Remoteproc carveout a memory region and load the slave firmware to this region, then send the size and offset to the slave before boot. The slave memory region is unknown before master execution, it cannot be set in QEMU command line.