From: Richard Henderson <rth@twiddle.net>
To: Laurent Desnogues <laurent.desnogues@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] User mode: Handle x86_64 vsyscall
Date: Sun, 07 Feb 2010 15:18:10 -0800 [thread overview]
Message-ID: <4B6F4A32.8070204@twiddle.net> (raw)
In-Reply-To: <761ea48b1002061550o54a940bfo438fb5f052c5e06e@mail.gmail.com>
On 02/06/2010 03:50 PM, Laurent Desnogues wrote:
>> * target-i386 code should not have to know about
>> linux 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.
Actually, it should be easy for QEMU to handle this.
The application is given the address of the VDSO in the AT_SYSINFO and
AT_SYSINFO_EHDR entries of the auxvec (on the stack above argv and
environ). We can place this anywhere we like; the fact that the kernel
puts it in high memory is merely a convenience to the kernel.
There *is* a legacy vsyscall address in high memory, from before the
whole VDSO arrangement was worked out, but we could probably get away
with ignoring that. Certainly well behaved applications will be
honoring the VDSO when it is given.
>> * it is not possible to step into vsyscall code
>> using 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.
If QEMU implements the VDSO, the page *will* be mapped, and the debugger
will Just Work.
I imagine that QEMU's VDSO would not have the complicated bits that the
kernel's version does, where it arranges to read the clock without going
into kernel space. I imagine QEMU would simply stuff a normal syscall
sequence in there, which would automatically be emulated in the normal way.
Have a stare at the linux/arch/x86/vdso directory to see how things work.
r~
next prev parent reply other threads:[~2010-02-07 23:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 15:14 [Qemu-devel] [PATCH] User mode: Handle x86_64 vsyscall Laurent Desnogues
2009-10-17 15:42 ` [Qemu-devel] " Laurent Desnogues
2009-10-17 19:57 ` [Qemu-devel] " Edgar E. Iglesias
2009-10-18 0:16 ` Laurent Desnogues
2009-10-18 2:47 ` Jamie Lokier
2009-10-18 11:23 ` Laurent Desnogues
2009-10-18 3:09 ` Jamie Lokier
2009-10-18 7:17 ` Edgar E. Iglesias
2009-10-18 11:29 ` Laurent Desnogues
2010-02-04 22:15 ` Stefan Weil
2010-02-05 22:57 ` Stefan Weil
2010-02-06 1:37 ` Laurent Desnogues
2010-02-06 7:49 ` Stefan Weil
2010-02-06 23:50 ` Laurent Desnogues
2010-02-07 0:22 ` Jamie Lokier
2010-02-07 3:11 ` malc
2010-02-07 10:06 ` Laurent Desnogues
2010-02-07 23:18 ` Richard Henderson [this message]
2010-02-08 14:57 ` Vince Weaver
2010-02-06 20:12 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6F4A32.8070204@twiddle.net \
--to=rth@twiddle.net \
--cc=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).