From: Guofu Xiang Subject: A question about SYSENTER/SYSEXIT in HVM guest Date: Mon, 6 Apr 2009 21:11:52 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0760442939==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0760442939== Content-Type: multipart/alternative; boundary=000e0cd16e8054ee0b0466e2a495 --000e0cd16e8054ee0b0466e2a495 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The CPU type of our server is Intel Xeon E5310, and the OS is Fedora 8. Xen 3.2 is installed by compilation. When the HVM guest is x86_32 Fedora 8, the system call is implemented by instruction - *int $80h*. Our debug result by gdb is as follow. Dump of assembler code for function __kernel_vsyscall: 0xb7f87400 <__kernel_vsyscall+0>: int $0x80 0xb7f87402 <__kernel_vsyscall+2>: ret End of assembler dump. However, when the HVM guest is x86_64 Fedora 8, the system call is implemented by instruction - *syscall*. The debug result is as fellow: Dump of assembler code for function getuid: 0x00000036e7296220 : mov $0x66,%eax 0x00000036e7296225 : syscall 0x00000036e7296227 : retq As far as I know, fast system call is implemented by *sysenter* on Intel CPU, and *syscall* on AMD CPU. Why the debug result is *syscall*, rather than *sysenter*? If the HVM guest is x86_32 Fedora 8, can we set the system call implementation by *sysenter*? In x86_64 OS, is all system call implemented by *syscall*? Thank you for your response! --000e0cd16e8054ee0b0466e2a495 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The CPU type of our server is Intel Xeon E5310, and the OS is Fedora 8. Xen= 3.2 is installed by compilation. When the HVM guest is x86_32 Fedora 8, th= e system call is implemented by instruction - int $80h. Our debug result by gdb is as follow.
=A0
Dump of assembler code for function __kernel_vsyscall:
0xb7f87400= <__kernel_vsyscall+0>:=A0=A0=A0=A0=A0=A0 int=A0=A0=A0 $0x80
0xb7f= 87402 <__kernel_vsyscall+2>:=A0=A0=A0=A0=A0=A0 ret=A0=A0=A0
End o= f assembler dump.
=A0
However, when the HVM guest is x86_64 Fedora 8,= the system call is implemented by instruction - syscall. The debug result is as fellow:
=A0
Dump of assembler code for function getuid:
0x00000036e7296220 &l= t;getuid+0>:=A0 mov=A0=A0=A0 $0x66,%eax
0x00000036e7296225 <getuid= +5>:=A0 syscall
0x00000036e7296227 <getuid+7>:=A0 retq
=A0=
As far as I know, fast system call is implemented by sysent= er on Intel CPU, and syscall on AMD= CPU. Why the debug result is syscall, rather tha= n sysenter?
If the HVM guest is x86_32 Fedora 8, can we set the system call implementat= ion by sysenter? In x86_64 OS, is all system call= implemented by syscall?
=A0
Thank you for = your response! --000e0cd16e8054ee0b0466e2a495-- --===============0760442939== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0760442939==--