Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IXiTp-0001ER-2P for qemu-devel@nongnu.org; Tue, 18 Sep 2007 15:11:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IXiTo-0001Dv-IO for qemu-devel@nongnu.org; Tue, 18 Sep 2007 15:11:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXiTo-0001Dr-Bz for qemu-devel@nongnu.org; Tue, 18 Sep 2007 15:11:28 -0400 Received: from mx2.suse.de ([195.135.220.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IXiTn-0005wg-Sx for qemu-devel@nongnu.org; Tue, 18 Sep 2007 15:11:28 -0400 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <1190139947.9564.60.camel@phantasm.home.enterpriseandprosperity.com> References: <1190118724.9564.49.camel@phantasm.home.enterpriseandprosperity.com> <46EFD842.7070207@gmail.com> <1190139947.9564.60.camel@phantasm.home.enterpriseandprosperity.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Alexander Graf Subject: Re: [Qemu-devel] Insta-segfault! i386-linux-user Date: Tue, 18 Sep 2007 21:11:17 +0200 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: thayne@c2.net, qemu-devel@nongnu.org On Sep 18, 2007, at 8:25 PM, Thayne Harbaugh wrote: > On Tue, 2007-09-18 at 15:53 +0200, Ronald wrote: >> Thayne Harbaugh schreef: >>> Has anyone seen an insta-segfault with i386-linux-user qemu? I've >>> compiled qemu-0.9.0 as well as qemu-cvs (2007-09-18) with gcc-3.4 >>> and >>> -fno-strict-aliasing on an amd64 and I get this: >>> >>> ./i386-linux-user/qemu-i386 --help >>> Segmentation fault >>> >>>> From GDB: >>> >>> Program received signal SIGSEGV, Segmentation fault. >>> 0x0000000000000000 in ?? () >>> (gdb) bt >>> #0 0x0000000000000000 in ?? () >>> #1 0x00000000600575ed in __libc_csu_init () >>> #2 0x00002b826c660ade in __libc_start_main () from /lib/libc.so.6 >>> #3 0x00000000600050e9 in _start () > > > >>> >> Yes, I had this problem too. U only compiled the program using the >> 'user' parameters. > > I only compiled the 'user' portion because that's all I want. > >> But to get the virtualisation going, you need to >> compile at least one 'softmmu' (whatever that is). Doing that will >> create the executable: qemu (this is the executable you >> want :) ) > > Err, no. I don't want full virtualization. > >> So I run Linux and I compile it with (and I really need it): >> >> i386-linux-user AND i386-softmmu (i386 can be replaced with your >> arch such as: ppc, sparc, x86_64, mips, mipsel and arm) >> >> That should create an executable called qemu (as stated before) which >> should not segfault immediatly lol :) > > Thank you for your comments. User virtualization doesn't require > softmmu. User virtualization translates the ops in the user space > program and then jumps into the real kernel of the host operating > system > when a syscall is made - it therefore doesn't need to virtualize > all of > the hardware for I/O and the like. Obviously this only works for > running linux executables of one architecture on linux of possibly > another architecture. > > I might mention that none of the other user-space architectures > segfault > - just i386 - e.g. arm-linux-user/qemu-arm works just fine. > > > > We had this on the list some months ago. As far as I recall this correctly the problem is the linker script. Just take a look at the suse source rpm where we replace that one, so it works with x86_64. Be prepared for breakage though, as linux-user on 64-Bit hosts does not work properly. Cheers, Alex