From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51715 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdW0f-0005Nz-Jx for qemu-devel@nongnu.org; Mon, 26 Jul 2010 18:18:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdW0b-00009Y-7u for qemu-devel@nongnu.org; Mon, 26 Jul 2010 18:18:57 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:45980) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdW0b-00009Q-4m for qemu-devel@nongnu.org; Mon, 26 Jul 2010 18:18:53 -0400 Received: by iwn6 with SMTP id 6so3221624iwn.4 for ; Mon, 26 Jul 2010 15:18:52 -0700 (PDT) Message-ID: <4C4E09C5.1010200@codemonkey.ws> Date: Mon, 26 Jul 2010 17:18:45 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device References: <1276633426-30995-1-git-send-email-cam@cs.ualberta.ca> <4C4D922C.3020608@codemonkey.ws> <4C4DE501.2080202@codemonkey.ws> <4C4DEFBD.9000700@redhat.com> <4C4DF2F4.1070109@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cam Macdonell Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On 07/26/2010 04:46 PM, Cam Macdonell wrote: > On Mon, Jul 26, 2010 at 2:41 PM, Anthony Liguori wrote: > >> On 07/26/2010 03:27 PM, Avi Kivity wrote: >> >>> On 07/26/2010 10:41 PM, Anthony Liguori wrote: >>> >>>> kvm_set_irqfd() is fine, it just needs to be ported. It should be there >>>> due to vhost though? >>>> >>>> >>> It should, but isn't. >>> >>> >>>> qemu_ram_map() is more difficult. I would think the better approach >>>> would be to invert things. Instead of a "give me a stable mapping that is >>>> shared atomically with a guest to this ram region", I would go with "go >>>> create a ram region with this preallocated memory" and then just assume that >>>> afterwards, you can make use of it and it's exposed as atomic memory. >>>> >>> Isn't that what qemu_ram_map() does? >>> >> Yup, name is misleading. I thought it was the equivalent of >> cpu_physical_memory_map() but took a ram_addr_t instead of a target_ulong. >> > If I add it to my patch set, should I change the name to the suggested > qemu_ram_alloc_from_ptr() or keep it as is for consistency? > Please rename it. > Also, the current version of qemu_ram_map() in qemu-kvm.git uses the > DeviceState parameter. Are Alex's DeviceState changes going into 0.13 > for the qemu_ram_*() functions?? > They're already there. Regards, Anthony Liguori > Cam > > >> Regards, >> >> Anthony Liguori >> >> >>> >>>> ram_addr_t qemu_ram_map(DeviceState *dev, const char *name, >>>> ram_addr_t size, void *host) >>>> >>> 'host' is your "this preallocated memory", no? >>> >>> >> >>