From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq0GM-00006j-5E for qemu-devel@nongnu.org; Wed, 06 May 2015 10:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq0GH-00024e-71 for qemu-devel@nongnu.org; Wed, 06 May 2015 10:25:26 -0400 Received: from nm38-vm5.bullet.mail.gq1.yahoo.com ([98.136.217.76]:34245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq0GG-00023k-Mo for qemu-devel@nongnu.org; Wed, 06 May 2015 10:25:21 -0400 Date: Wed, 6 May 2015 14:22:34 +0000 (UTC) From: =?UTF-8?B?5rWp5YCrIOmtjw==?= Message-ID: <324879053.469283.1430922154067.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_469282_888118622.1430922154062" Subject: [Qemu-devel] How QEMU maintains the translation from guest virtual address to guest physical address? Reply-To: =?UTF-8?B?5rWp5YCrIOmtjw==?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" ------=_Part_469282_888118622.1430922154062 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, all: I've been trying to understand the process of address translation inside QEMU, but I got stuck in GVA->GPA.I've known that QEMU uses a two level description table 'PhysPageDesc' to maintain the translation between GPA & HVA(host virtual address), but I couldn't find out where QEMU translates GVA to GPA to go to that table to find HVA when a TLB missed occured. I've traced the internal codes and there are something may be able to solve my problems but I can't figure it out, could anyone help me?There is a function get_level1_table_address() called by get_phys_addr() in target-arm/helper.c, and it seems like start translating the GVA to GPA. But I don't understand the env->cp15.c2_base_mask variable which claimed to be the MMU translation table base selection mask means. Where is the description of MMU translation table? Any suggestions would be helpful to me.Thanks in advance. ------=_Part_469282_888118622.1430922154062 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi, all:
I've been trying to understand the process of address translation inside QEMU, but I got stuck in GVA->GPA.
I've known that QEMU uses a two level description table 'PhysPageDesc' to maintain the translation between GPA & HVA(host virtual address), but I couldn't find out where QEMU translates GVA to GPA to go to that table to find HVA when a TLB missed occured.
I've traced the internal codes and there are something may be able to solve my problems but I can't figure it out, could anyone help me?
There is a function get_level1_table_address() called by get_phys_addr() in target-arm/helper.c, and it seems like start translating the GVA to GPA. But I don't understand the env->cp15.c2_base_mask variable which claimed to be the MMU translation table base selection mask means. Where is the description of MMU translation table?

Any suggestions would be helpful to me. Thanks in advance.

------=_Part_469282_888118622.1430922154062--