From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NduQD-0005EL-8U for qemu-devel@nongnu.org; Sat, 06 Feb 2010 18:50:41 -0500 Received: from [199.232.76.173] (port=60484 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NduQC-0005Du-SV for qemu-devel@nongnu.org; Sat, 06 Feb 2010 18:50:40 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NduQC-00083I-3X for qemu-devel@nongnu.org; Sat, 06 Feb 2010 18:50:40 -0500 Received: from mail-px0-f189.google.com ([209.85.216.189]:53560) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NduQB-00083E-Qi for qemu-devel@nongnu.org; Sat, 06 Feb 2010 18:50:39 -0500 Received: by pxi27 with SMTP id 27so2638882pxi.4 for ; Sat, 06 Feb 2010 15:50:38 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4B6D1F17.7020904@mail.berlios.de> 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> <4B6D1F17.7020904@mail.berlios.de> Date: Sun, 7 Feb 2010 00:50:38 +0100 Message-ID: <761ea48b1002061550o54a940bfo438fb5f052c5e06e@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] User mode: Handle x86_64 vsyscall From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org On Sat, Feb 6, 2010 at 8:49 AM, Stefan Weil wrote: [...] > I tested two different hosts with x86_64-linux-user: > > * 32 bit Intel (i386) - does not work with your patch For me x86_64 on i386 has always failed without even calling vsyscall :-) > * 64 bit AMD (x86_64) =A0- 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 > =A0linux vsyscall Given that we have to workaround 64-bit virtual address limitations (cf. Richard mail and previous discussions on the list), doing otherwise looks difficult. > * there is no vsyscall page in memory, > =A0but very special programs might expect to see one > =A0(it is even worse: the target sees the memory page > =A0of the host) > > * it is not possible to step into vsyscall code > =A0using a debugger How would you achieve that? Your guest OS doesn't necessarily have the code mapped. I think this has to be considered as other syscalls, though slightly different. > 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. You mean you'd explicitly put somewhere x86_64 code that simulates the behaviour of vsyscall? Laurent