From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdMGI-0005R2-Vb for qemu-devel@nongnu.org; Wed, 21 Dec 2011 08:31:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdMG8-00049d-OC for qemu-devel@nongnu.org; Wed, 21 Dec 2011 08:31:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdMG8-00049Q-Gk for qemu-devel@nongnu.org; Wed, 21 Dec 2011 08:31:04 -0500 Message-ID: <4EF1DF91.3020905@redhat.com> Date: Wed, 21 Dec 2011 15:30:57 +0200 From: Avi Kivity MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] memory: Why subpage is introduced? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: Stefan Hajnoczi , Anthony Liguori , qemu-devel@nongnu.org On 12/21/2011 02:09 PM, Zhi Yong Wu wrote: > HI, > > For memory management, i have several questions as below: > > 1.) Why is subpage introduced? what is its goal? A TLB entry spans one page; a subpage is a way of dispatching accesses through that tlb entry to various memory regions. > 2.) How to render MemoryRegion into one disjoint flatrange list? That > rendering function is a bit difficult to understand. Can anyone simply > explain it? What exactly don't you understand? > > 3.) What are separately the meanings of these flags? such as > IO_MEM_RAM, IO_MEM_ROM, IO_MEM_UNASSIGNED, IO_MEM_*, IO_MEM_ROMD, and > IO_MEM_SUBPAGE. RAM = RAM ROM = ROM UNASSIGNED = nothing handles this range ROMD = ROM when read, device (i.e. callbacks) when written SUBPAGE = dispatch using the lower address bits to obtain final I/O handler. -- error compiling committee.c: too many arguments to function