Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1LjH-00085X-Lf for qemu-devel@nongnu.org; Mon, 12 Apr 2010 11:39:15 -0400 Received: from [140.186.70.92] (port=33096 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1LjF-000859-Vq for qemu-devel@nongnu.org; Mon, 12 Apr 2010 11:39:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1LjD-0000xO-L1 for qemu-devel@nongnu.org; Mon, 12 Apr 2010 11:39:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48785 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1LjD-0000xG-BI for qemu-devel@nongnu.org; Mon, 12 Apr 2010 11:39:11 -0400 Subject: Re: [Qemu-devel] [RFC] Host vs Guest memory allocation Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <4BC337C2.2090500@redhat.com> Date: Mon, 12 Apr 2010 17:39:04 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4BBA6803.3000008@twiddle.net> <20100405231821.GA27894@volta.aurel32.net> <4BC3088E.5080603@redhat.com> <4BC3345A.6090401@twiddle.net> <4BC337C2.2090500@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel Developers , Aurelien Jarno , Richard Henderson On 12.04.2010, at 17:09, Avi Kivity wrote: > On 04/12/2010 05:55 PM, Richard Henderson wrote: >>=20 >>> You could reduce the overhead somewhat by using kvm for memory >>> translation on hosts that support it. Of course tcg translation and >>> syscall costs will grow by the exit overhead. >>=20 >> I've thought about this a bit, and what seemed to be the stickler is >> what is the environment that runs in the guest? TCG generated code >> is of course fine, but what about the helper functions? How can we >> tell whether a given helper function can run in the restricted = environment of the guest or whether it needs to transition back to the = environment of the host to do its work? >=20 > I'd guess all helpers can run in guest context except those that cause = a transition to target kernel mode. >=20 >> I suppose the obvious solution is some sort of flag on the function = that well-maintained ports will set. But the whole marshalling thing is = still pretty tricky. >=20 > Pass everything through memory; will there be many transitions apart = from trapping instructions and missing translations? I don't see how that would help with the 64-on-32 issue. You still don't = get a 64 bit address space from running inside KVM. Alex