From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgtEZ-0000jO-BL for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:52:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgtES-00079b-VF for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:52:18 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:50379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgtER-00078B-2T for qemu-devel@nongnu.org; Tue, 19 Jun 2012 03:52:12 -0400 Date: Tue, 19 Jun 2012 15:52:02 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120619075201.GA34488@cs.nctu.edu.tw> References: <20120613031426.GA8174@cs.nctu.edu.tw> <20120614031826.GA88265@cs.nctu.edu.tw> <20120618082803.GA49309@cs.nctu.edu.tw> <87wr34l62z.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87wr34l62z.fsf@fimbulvetr.bsc.es> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?TGx1w61z?= Vilanova Cc: Blue Swirl , laurent.desnogues@gmail.com, qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= , stefanha@gmail.com > But if QEMU/TCG is doing a GVA->GPA translation as Wei-Ren said, I don'= t see how > KVM can help. Just want to clarify. QEMU maintain a TLB (env->tlb_table) which stores= GVA -> HVA mapping, it is used to speedup the address translation. If TLB miss, = QEMU will call cpu_arm_handle_mmu_fault (take ARM as an example) doing GVA -> = GPA translation. =20 > I could understand having multiple 32bit regions in QEMU's virtual spac= e (no > need for KVM), one per guest page table, and then simply adding an offs= et to > every memory access to redirect it to the appropriate 32-bit region (1 = region > per guest page table). >=20 > This could translate a single guest ld/st into a host ld+add+ld/st (the= first > load is to get the "region" offset for the currently executing guest co= ntext). It differs from what QEMU's doing? Each time we fill TLB, we add an off= set to the GPA to get HVA, then store GVA -> HVA mapping into the TLB (IIUC). I = don't see much differences here. =20 Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj