From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH v4 1/2] Minimal RAM API support Date: Wed, 15 Dec 2010 13:34:52 -0600 Message-ID: <4D09185C.5020204@codemonkey.ws> References: <20101213212059.2472.17879.stgit@s20.home> <20101213212430.2472.23807.stgit@s20.home> <201012151723.32164.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, Alex Williamson , blauwirbel@gmail.com, kvm@vger.kernel.org To: Paul Brook Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:62762 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753326Ab0LOTe4 (ORCPT ); Wed, 15 Dec 2010 14:34:56 -0500 Received: by qwa26 with SMTP id 26so2347330qwa.19 for ; Wed, 15 Dec 2010 11:34:55 -0800 (PST) In-Reply-To: <201012151723.32164.paul@codesourcery.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/15/2010 11:23 AM, Paul Brook wrote: >> This adds a minimum chunk of Anthony's RAM API support so that we >> can identify actual VM RAM versus all the other things that make >> use of qemu_ram_alloc. >> > Why do we care? How are you defining "actual VM RAM"? > > Surely the whole point of qemu_ram_alloc is to allocate a chunk of memory that > can be mapped into the guest physical address space, so all uses of > qemu_ram_alloc should be using this API. > "actual VM RAM" == the DIMM devices. This address has exactly a 1-1 mapping between memory content and an address. It doesn't change during program execution. It may be mapped in the CPU in weird ways, it may be visibly different to devices, but that's a different interface. Why do we care about differentiating "actual VM RAM" from things that behave like RAM but are not actually RAM (like device ROM)? Because the semantics are different. ROM is non-volatile and RAM is volatile. If we don't make that distinction in our interfaces, we loose the ability to model the behavioral differences. For things like paravirtual devices, we can take short cuts (to optimize performance) by saying the device is directly connecting to RAM (and doesn't go through the normal translation hierarchy). Regards, Anthony Liguori > Paul > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >