From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5PjU-0007L9-IQ for qemu-devel@nongnu.org; Thu, 31 Mar 2011 17:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5PjD-0005Lo-VO for qemu-devel@nongnu.org; Thu, 31 Mar 2011 17:48:32 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:42368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5PjD-0005Lk-R1 for qemu-devel@nongnu.org; Thu, 31 Mar 2011 17:48:31 -0400 Received: by gxk26 with SMTP id 26so1359688gxk.4 for ; Thu, 31 Mar 2011 14:48:31 -0700 (PDT) Message-ID: <4D94F6AD.2020200@codemonkey.ws> Date: Thu, 31 Mar 2011 16:48:29 -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> <20110331212628.GA27239@redhat.com> <4D94F2FC.4000509@codemonkey.ws> <20110331213743.GA27264@redhat.com> In-Reply-To: <20110331213743.GA27264@redhat.com> 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: "Michael S. Tsirkin" Cc: Peter Maydell , Alex Williamson , qemu-devel@nongnu.org On 03/31/2011 04:37 PM, Michael S. Tsirkin wrote: > On Thu, Mar 31, 2011 at 04:32:44PM -0500, Anthony Liguori wrote: >> On 03/31/2011 04:26 PM, Michael S. Tsirkin wrote: >>> On Thu, Mar 31, 2011 at 02:29:50PM -0500, Anthony Liguori wrote: >>>> On 03/31/2011 02:18 PM, Peter Maydell wrote: >>>>> On 31 March 2011 20:01, Anthony Liguori wrote: >>>>>> VGA is just another device. It happens to be that we treat VGA device >>>>>> memory as something that behaves like ram occassionally but that does not >>>>>> make it RAM. >>>>> 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. >>>> >>>>> 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. >>>> >>>> Regards, >>>> >>>> Anthony Liguori >>> Not only that I guess. Removing the VGA memory with the baloon >>> will likely also be a bad idea. >> It's just the equivalent of a memset(0). It would be a silly thing >> for a guest to do but not somethign to be concerned about. >> >> Regards, >> >> Anthony Liguori >> > > BTW, what is IO_MEM_NOTDIRTY? TCG needs to keep track of dirty memory in order to be able to deal with self modifying code. IO_MEM_NOTDIRTY is the state that RAM takes before the first write. I don't think IO_MEM_NOTDIRTY would ever show up in the l1_phys_map but it will show up in the iotlb. The iotlb uses the same dispatch code as the l1_phys_map though. Regards, Anthony Liguori > I thought another way would be to replace IO_MEM_RAM with > IO_MEM_DEVICE_SHADOW_RAM in these cases but no idea > what the right value for that enum would be. >