From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1I8C-0007hZ-Ms for qemu-devel@nongnu.org; Mon, 12 Apr 2010 07:48:44 -0400 Received: from [140.186.70.92] (port=58754 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1I8B-0007hR-Jc for qemu-devel@nongnu.org; Mon, 12 Apr 2010 07:48:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1I89-0001Y0-Hz for qemu-devel@nongnu.org; Mon, 12 Apr 2010 07:48:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4799) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1I89-0001Xc-Ab for qemu-devel@nongnu.org; Mon, 12 Apr 2010 07:48:41 -0400 Message-ID: <4BC3088E.5080603@redhat.com> Date: Mon, 12 Apr 2010 14:48:30 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Host vs Guest memory allocation References: <4BBA6803.3000008@twiddle.net> <20100405231821.GA27894@volta.aurel32.net> In-Reply-To: <20100405231821.GA27894@volta.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel Developers , Richard Henderson On 04/06/2010 02:18 AM, Aurelien Jarno wrote: > >> (1) Enable softmmu for userland. This is of course the highest overhead, >> but will work for all combinations. >> >> > This option would solve a lot of problems and simplify a lot of code: > unaligned access on hosts requiring strict alignements, different page > size between host and guest, self-modifying code, 64-bit user land on > 32-bit host, etc... That's what currently comes to my mind, but that > would solve a lot more problems. > > It will clearly have a high overhead, but it might be interesting to > quantify it, to see if we should continue to add tons of code/workaround > to linux-user instead of switching to softmmu for userland. It could > also be optimized, for example by increasing the TLB size compared to > system mode, and doing TLB preallocation on mmap calls. > > 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. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.