From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH v7 0/4] Inter-VM shared memory device Date: Mon, 26 Jul 2010 15:41:24 -0500 Message-ID: <4C4DF2F4.1070109@codemonkey.ws> References: <1276633426-30995-1-git-send-email-cam@cs.ualberta.ca> <4C4D922C.3020608@codemonkey.ws> <4C4DE501.2080202@codemonkey.ws> <4C4DEFBD.9000700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Cam Macdonell , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:50702 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752330Ab0GZUl1 (ORCPT ); Mon, 26 Jul 2010 16:41:27 -0400 Received: by yxg6 with SMTP id 6so230997yxg.19 for ; Mon, 26 Jul 2010 13:41:27 -0700 (PDT) In-Reply-To: <4C4DEFBD.9000700@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. 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? >