From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43394 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5OOm-0005Jr-HV for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5OOZ-00084z-O0 for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:23:08 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:44880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5OOZ-00084v-KK for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:23:07 -0400 Received: by ywl41 with SMTP id 41so1322934ywl.4 for ; Thu, 31 Mar 2011 13:23:07 -0700 (PDT) Message-ID: <4D94E2A7.80700@codemonkey.ws> Date: Thu, 31 Mar 2011 15:23:03 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers References: <20110331174328.GA25133@redhat.com> <4D94C916.6080709@codemonkey.ws> <20110331184940.GA25688@redhat.com> <4D94CFA0.3030605@codemonkey.ws> <4D94D62E.2060206@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alex Williamson , qemu-devel@nongnu.org, "Michael S. Tsirkin" On 03/31/2011 03:12 PM, Peter Maydell wrote: > On 31 March 2011 20:29, Anthony Liguori wrote: >> On 03/31/2011 02:18 PM, Peter Maydell wrote: >>> So, to ask a dumb question, what does make something RAM? >> It's a made up concept that we use to make device performance faster. >> >> Basically, RAM should include all of the memory that a reasonable device >> (that we control) would DMA to and has a relatively stable mapping. > This seems rather vague :-) "Suitable as a target for DMA" > seems more like a guest concept than a model one. This is really exploited for paravirtual I/O (namely virtio) so it does cross into a guest concept. >> Right, the trouble is, if you want to treat RAM like any other device, you >> can't get stable mappings to it which is bad for something like vhost-net. > Well, obviously you need to be able to revoke the permission > to use the fastpath pointer to the underlying memory. But you > need to be able to do that anyhow, to cover cases where (eg) the > guest has just written to some register that remaps the bottom > part of the address space so it's ROM rather than RAM, or whatever. > It's just a feature your optimisation needs to have. Equally, you > don't remap unless you have to, but if the mapping's changed then > it's changed... Right, the trouble now is that there's no way to distinguish between mapping where 1) we don't care about them in virtio and 2) they change frequently. Maybe the right approach here is to just use a virtio specific API and register RAM as register_virtio_dma_area(). Regards, Anthony Liguori > -- PMM >