From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdfQO-0004ik-Pn for qemu-devel@nongnu.org; Sat, 06 Feb 2010 02:49:52 -0500 Received: from [199.232.76.173] (port=51593 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdfQO-0004ic-4T for qemu-devel@nongnu.org; Sat, 06 Feb 2010 02:49:52 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdfQJ-00083n-Po for qemu-devel@nongnu.org; Sat, 06 Feb 2010 02:49:51 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:55030) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NdfQI-00083J-WF for qemu-devel@nongnu.org; Sat, 06 Feb 2010 02:49:47 -0500 Message-ID: <4B6D1F17.7020904@mail.berlios.de> Date: Sat, 06 Feb 2010 08:49:43 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] User mode: Handle x86_64 vsyscall References: <761ea48b0907110814t12c644b6mf733d3b5e28e152@mail.gmail.com> <20091017195726.GB9922@laped.iglesias.mooo.com> <20091018030944.GB15656@shareable.org> <761ea48b0910180429l9fdf32r7f0a8f7ceebb9eee@mail.gmail.com> <4B6CA26C.3060106@mail.berlios.de> <761ea48b1002051737k6d6d33a5pbdcdf0e2527988c1@mail.gmail.com> In-Reply-To: <761ea48b1002051737k6d6d33a5pbdcdf0e2527988c1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Desnogues Cc: qemu-devel@nongnu.org Laurent Desnogues schrieb: > On Fri, Feb 5, 2010 at 11:57 PM, Stefan Weil wrote: >> Laurent Desnogues schrieb: > [...] >> I'm still struggling with bntest and other x86_64-linux-user software >> calling any of the vsyscall functions. >> >> Laurent, your vsyscall patch only works on x86_64 hosts. >> >> A lot of software calls time() which uses vsyscall on x86_64 which >> does not work with x86_64-linux-user mode. > > I'm not sure I understand what you mean. Did you try > on some other host and it failed? Was your host > 32-bit? If so, I'm afraid user-mode will fail for more > reasons than vsyscall. > >> So the status of x86_64-linux-user is not more than experimental :-( >> >> I tried to modify x86_64-linux-user to set up a vsyscall page in high >> memory, >> but this seems to be difficult (at least with 32 bit host). >> >> Any hints how this should be done are welcome. > > My patch explicitly prevents the linking of the vsyscall > page. > > Could you provide more info about your host? > > > Laurent > I tested two different hosts with x86_64-linux-user: * 32 bit Intel (i386) - does not work with your patch * 64 bit AMD (x86_64) - works with your patch Your patch improves the emulation for 64 bit hosts. Nevertheless, it has some open points: * target-i386 code should not have to know about linux vsyscall * there is no vsyscall page in memory, but very special programs might expect to see one (it is even worse: the target sees the memory page of the host) * it is not possible to step into vsyscall code using a debugger My favorite solution would be a vsyscall page mapped to the correct fixed address and filled with QEMU generated specific code, for example code which calls the normal syscalls to do the work. This would only need modifications for linux-user code. Regards Stefan