From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyeNv-0003T7-Rn for qemu-devel@nongnu.org; Fri, 16 Oct 2009 00:25:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyeNs-0003Ro-1I for qemu-devel@nongnu.org; Fri, 16 Oct 2009 00:25:47 -0400 Received: from [199.232.76.173] (port=57105 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyeNr-0003Rf-O4 for qemu-devel@nongnu.org; Fri, 16 Oct 2009 00:25:43 -0400 Received: from smtp-outbound-2.vmware.com ([65.115.85.73]:32854) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyeNp-00068a-RH for qemu-devel@nongnu.org; Fri, 16 Oct 2009 00:25:42 -0400 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 0681F12224 for ; Thu, 15 Oct 2009 21:25:38 -0700 (PDT) Received: from [10.114.40.17] (unknown [10.114.40.17]) by jupiter.vmware.com (Postfix) with ESMTP id BF07EDC056 for ; Thu, 15 Oct 2009 21:25:37 -0700 (PDT) Message-ID: <4AD7F5C3.5060301@vmware.com> Date: Fri, 16 Oct 2009 00:25:39 -0400 From: Christoffer Dall MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Host virtual to target physical memory addresses List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I am trying to find out how emulated physical addresses relate to host allocated virtual addresses for ARM system emulation. Specifically, given a host virtual address allocated by QEMU for some memory region, I would like to find the corresponding guest (target) physical address. I have gone through the code for the integrator board and for the main memory I can see that both qemu_ram_alloc and cpu_register_physical_memory are called. I understand that the first deals with actually allocating the virtual addresses needed for the memory area and the second registers the memory with the virtual CPU. During cpu_register_physical_memory, eventually phys_page_find_alloc is called, and I can see that it is related to the software mmu code in target-arm/helper.c, but I am getting somewhat lost in the concepts RAMBlock, ram_offset and PhysPageDesc. Is there some documentation on this that I can study or can anyone give me a quick run-down on the concepts? Any help will be greatly appreciated. Thank you. Best regards, Christoffer Dall