From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Support adding a file to qemu's ram allocation Date: Mon, 08 Mar 2010 11:53:56 +0200 Message-ID: <4B94C934.9030809@redhat.com> References: <1267833161-25267-1-git-send-email-cam@cs.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Cam Macdonell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120Ab0CHJyA (ORCPT ); Mon, 8 Mar 2010 04:54:00 -0500 In-Reply-To: <1267833161-25267-1-git-send-email-cam@cs.ualberta.ca> Sender: kvm-owner@vger.kernel.org List-ID: 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