Re: Various x86 syscall mechanisms

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland McGrath <roland@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, June 27, 2008 - 5:45 pm

Roland McGrath wrote:

Hm, I think that's a post-facto rationalization.  At one point I noticed 
that int 0x80 always does 32-bit syscalls and considered doing a 
32-on-64 Valgrind variant.  But I never did that, and I don't believe 
anyone else has (but it's been a while since I've been closely involved 
in Valgrind development, so I could be wrong).


Yes.  And it seems that there are no cpuid feature bits relating to 
32-bit compat variants of these instructions (X86_FEATURE_SEP relates to 
whether the 64-bit mode supports SEP, and X86_FEATURE_SYSCALL is only 
set on AMD processors and implicit on 64-bit Intel processors).


The documentation has no caveats or exceptions.


K6 and Pentium II, respectively, I think (PPro claims to have it, but 
doesn't).  I seem to remember the first sysenter work going in around 
1998/9, so it was after the PII.


The AMD documentation says that syscall/sysret is higher performance 
than sysenter/sysexit, but I don't know if that's true, and if so, to 
what degree.  Intel makes no distinction.

HPA and Andi point out that the only AMD cpu which doesn't support 
sysenter is the K6, and its version of syscall is different from the K7 
and later anyway.

Thanks for the clarifying overview.  I've been piecing my understanding 
together as I've been getting 64-bit pvops Xen working, and trying to 
fit what it has to do to implement all these instructions and mode 
combinations, and it looks like I'm about right.

    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Various x86 syscall mechanisms, Jeremy Fitzhardinge, (Fri Jun 20, 6:00 pm)
Re: Various x86 syscall mechanisms, Roland McGrath, (Fri Jun 20, 7:39 pm)
Re: Various x86 syscall mechanisms, Bill Davidsen, (Sun Jun 29, 8:07 pm)
Re: Various x86 syscall mechanisms, Andi Kleen, (Sat Jun 28, 1:00 am)
Re: Various x86 syscall mechanisms, Jeremy Fitzhardinge, (Fri Jun 27, 5:45 pm)
Re: Various x86 syscall mechanisms, Roland McGrath, (Fri Jun 27, 5:52 pm)
Re: Various x86 syscall mechanisms, H. Peter Anvin, (Fri Jun 20, 8:27 pm)
Re: Various x86 syscall mechanisms, Jan Engelhardt, (Tue Jul 1, 8:06 am)
Re: Various x86 syscall mechanisms, Andi Kleen, (Sat Jun 21, 10:02 am)
Re: Various x86 syscall mechanisms, H. Peter Anvin, (Sat Jun 21, 12:51 pm)
Re: Various x86 syscall mechanisms, Jeremy Fitzhardinge, (Fri Jun 20, 10:00 pm)