From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoZez-0006ee-Cf for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:54:01 -0500 Received: from [199.232.76.173] (port=35269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoZey-0006eU-QJ for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:54:00 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoZey-00051o-3o for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:54:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64018) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoZex-00051g-O5 for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:53:59 -0500 Message-ID: <4B94C934.9030809@redhat.com> Date: Mon, 08 Mar 2010 11:53:56 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1267833161-25267-1-git-send-email-cam@cs.ualberta.ca> In-Reply-To: <1267833161-25267-1-git-send-email-cam@cs.ualberta.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Support adding a file to qemu's ram allocation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cam Macdonell Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 03/06/2010 01:52 AM, Cam Macdonell wrote: > This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM. This function mmaps the opened file anywhere and adds the memory to the ram blocks. > > Usage is > > qemu_add_file_to_ram(fd, size, MAP_SHARED); > A traditional name would be qemu_ram_mmap() as a counterpart to qemu_ram_alloc(). Would be nice to accept an offset. -- error compiling committee.c: too many arguments to function