From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53643 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5ODx-0006aK-AX for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:12:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5ODv-0006Do-V9 for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:12:09 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:39924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5ODv-0006Dg-QH for qemu-devel@nongnu.org; Thu, 31 Mar 2011 16:12:07 -0400 Received: by vws17 with SMTP id 17so2498922vws.4 for ; Thu, 31 Mar 2011 13:12:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4D94D62E.2060206@codemonkey.ws> References: <20110331174328.GA25133@redhat.com> <4D94C916.6080709@codemonkey.ws> <20110331184940.GA25688@redhat.com> <4D94CFA0.3030605@codemonkey.ws> <4D94D62E.2060206@codemonkey.ws> Date: Thu, 31 Mar 2011 21:12:06 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers From: Peter Maydell Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alex Williamson , qemu-devel@nongnu.org, "Michael S. Tsirkin" 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. >> My take on RAM is that RAM is just another device; the only >> difference is that you want to be able to implement fast >> paths that go straight(ish) to target memory; but that's >> an optimisation detail, not something that makes RAM >> conceptually different from other devices... > > 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... -- PMM