From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfjSM-00016K-Op for qemu-devel@nongnu.org; Wed, 10 Oct 2007 17:51:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfjSK-00015b-QU for qemu-devel@nongnu.org; Wed, 10 Oct 2007 17:51:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfjSK-00015Y-N7 for qemu-devel@nongnu.org; Wed, 10 Oct 2007 17:51:04 -0400 Received: from bangui.magic.fr ([195.154.194.245]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IfjSK-0006j7-61 for qemu-devel@nongnu.org; Wed, 10 Oct 2007 17:51:04 -0400 Received: from [192.168.0.2] (ppp-36.net-123.static.magiconline.fr [80.118.184.36]) by bangui.magic.fr (8.13.1/8.13.1) with ESMTP id l9ALov28024186 for ; Wed, 10 Oct 2007 23:50:57 +0200 Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets From: "J. Mayer" In-Reply-To: References: <1192002128.9976.186.camel@rapid> <470C8AD9.6000002@bellard.org> <20071010174906.GC3379@networkno.de> <470D1C9A.2000505@bellard.org> Content-Type: text/plain Date: Wed, 10 Oct 2007 23:51:01 +0200 Message-Id: <1192053061.9976.198.camel@rapid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, 2007-10-10 at 22:02 +0300, Blue Swirl wrote: > On 10/10/07, Fabrice Bellard wrote: > > 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. > > I think this would be sufficient for the Sparc and this way there > would be no need to convert the structures. Brilliant! > > Should we revert the elfload32 patch? What about PPC? We can keep the elfload32 for now, it does not hurt. This approach is OK for PPC too. And as I got some 32 bits programs running in the 64 bits linux-user emulator, the same programs behavior can be compared to find eventual issues... -- J. Mayer Never organized