|
From: Tom H. <to...@co...> - 2005-08-10 16:05:18
|
In message <200...@we...>
Naveen Kumar <g_n...@ya...> wrote:
> According to this
> http://cvs.opensolaris.org/source/xref/usr/src/uts/i86pc/ml/syscall_asm.s#65
>
> sysenter operation is as follows
>
> The caller in userland has arranged that:
> - %eax contains the syscall number
> - %ecx contains the user %esp
> - %edx contains the return %eip
> - the user stack contains the args to the syscall
>
> So %edx contains the %eip to return to after sysenter
> is completed. Is that the same on Linux ?
No. That is OS specific. On linux when sysenter is in the use the
kernel just returns to a fixed address in the user process. The
processor itself make no assumptions about a given register containing
a return address nor does it automatically save one.
What Julian has done should work fine for both schemes - you will
just have to copy the contents of guest_EDX into guest_EIP at the
appropriate time.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|