From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfgUL-00062J-Ci for qemu-devel@nongnu.org; Wed, 10 Oct 2007 14:40:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfgUJ-000627-EM for qemu-devel@nongnu.org; Wed, 10 Oct 2007 14:40:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfgUJ-000624-As for qemu-devel@nongnu.org; Wed, 10 Oct 2007 14:40:55 -0400 Received: from sp604002mt.neufgp.fr ([84.96.92.61] helo=sMtp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IfgUI-0002Ba-W9 for qemu-devel@nongnu.org; Wed, 10 Oct 2007 14:40:55 -0400 Received: from [86.73.70.184] by sp604002mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0JPP001C0L831000@sp604002mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Wed, 10 Oct 2007 20:40:53 +0200 (CEST) Date: Wed, 10 Oct 2007 20:40:26 +0200 From: Fabrice Bellard Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets In-reply-to: <20071010174906.GC3379@networkno.de> Message-id: <470D1C9A.2000505@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT References: <1192002128.9976.186.camel@rapid> <470C8AD9.6000002@bellard.org> <20071010174906.GC3379@networkno.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thiemo Seufer Cc: qemu-devel@nongnu.org Thiemo Seufer wrote: > Fabrice Bellard wrote: >> J. Mayer wrote: >>> Following the patches done for elfload32, it appeared to me that there >>> were still problems that would prevent 32 bits executables to run on 64 >>> bits target in linux user mode emulation. >>> [...] >> Are you sure it is a good idea to try to add 32 bit executable support to a >> 64 bit target ? In the end you will need to write a 64 bit to 32 bit linux >> syscall converter which would mean duplicating all the linux-user code of >> the corresponding 32 bit target (think of ioctls with strutures, signals >> frames, etc...). > > I would think this feature will be limited to platforms which can handle > 32bit and 64bit binaries with a single personality. I am not sure it is a common case ! However, I suggest to emulate a 32 bit user linux system with a 64 bit guest CPU running in 32 bit compatibily mode. It would be useful to test 64 bit CPUs in 32 bit compatibility mode. The only required modification in linux user is to rename target_ulong so that it can have a different size of the CPU word default size. Regards, Fabrice.