Received: from eggs.gnu.org ([208.118.235.92]:36180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgw20-00082a-Uk for qemu-devel@nongnu.org; Tue, 19 Jun 2012 06:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sgw1r-0002iM-IT for qemu-devel@nongnu.org; Tue, 19 Jun 2012 06:51:32 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:41092 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgw1r-0002hk-7Y for qemu-devel@nongnu.org; Tue, 19 Jun 2012 06:51:23 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20120613031426.GA8174@cs.nctu.edu.tw> <20120614031826.GA88265@cs.nctu.edu.tw> <20120618082803.GA49309@cs.nctu.edu.tw> <87wr34l62z.fsf@fimbulvetr.bsc.es> Date: Tue, 19 Jun 2012 13:51:15 +0300 In-Reply-To: (Michael Kang's message of "Tue, 19 Jun 2012 17:47:21 +0800") Message-ID: <87mx3zk21o.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: "Michael.Kang" Cc: Blue Swirl , laurent.desnogues@gmail.com, qemu-devel@nongnu.org, =?utf-8?B?6Zmz6Z+L5Lu7IChX?= =?utf-8?B?ZWktUmVuIENoZW4p?= , stefanha@gmail.com Michael Kang writes: > On Tue, Jun 19, 2012 at 4:26 AM, Llu=C3=ADs Vilanova wrote: [...] >> I could understand having multiple 32bit regions in QEMU's virtual space= (no >> need for KVM), one per guest page table, and then simply adding an offse= t to >> every memory access to redirect it to the appropriate 32-bit region (1 r= egion >> 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 con= text). >>=20 >> With this, you can use 'mprotect' in QEMU to enforce the guest's page >> permissions (as long as the host supports it), and 'mmap' to share the h= ost >> physical memory between the different 32-bit regions whenever the guest = page >> tables share guest physical memory (again, as long as the host supports = it). >>=20 >> But I suppose having a guest with as many or more bits than the host is = the >> common case, which hinders its applicability. > I ever have some thought like you. Firstly , we only simulate 32bit > guest on 64 bit host for the case. > Secondly I ever did some experiments. And I can not mmap the address > space more than > about 8G on 64 bit linux OS. Maybe there some limits in the linux > kernel of host. You can see your resource limits with "ulimit -a", but without more info I cannot tell what's actually going on. Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth