From mboxrd@z Thu Jan 1 00:00:00 1970 From: X Subject: question about syscall interception Date: Thu, 16 Feb 2012 15:34:31 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6654557442869447091==" 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 --===============6654557442869447091== Content-Type: multipart/alternative; boundary=e0cb4efa6ed867e54004b91ac16d --e0cb4efa6ed867e54004b91ac16d Content-Type: text/plain; charset=ISO-8859-1 Hello everyone, I have a few questions about syscall interception in Xen. Thanks for any advice/suggestion. Setting: CPU, Xen and PV Linux guest are all 64-bit (1) If a guest app uses "syscall" instruction to launch a system call to the guest kernel, is that behavior intercepted by Xen by default? If yes, could someone please point me to the related code in Xen for this interception? (anything to do with "switch_to_kernel in xen/arch/x86/x86_64/entry.S"?) If no, then how could I intercept that instruction in this case? (2) If a guest app uses "int 0x80" to launch a system call, then is it true that after "init_int80_direct_trap," the int 0x80 is no longer intercepted by Xen, and the app can trap directly into the guest kernel? My understanding is that "init_int80_direct_trap" initializes vcpu's arch_vpuc.int80_bounce. Could someone please briefly explain how things work after this struct is properly setup? How could I intercept system calls launched in this way in Xen? Thanks. X --e0cb4efa6ed867e54004b91ac16d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello everyone,

I have a few questions about syscall int= erception in Xen. Thanks for any advice/suggestion.=A0

=
Setting: CPU, Xen and PV Linux guest are all 64-bit

(1) If a guest app uses "syscall" instruction to launch a sy= stem call to the guest kernel, is that behavior intercepted by Xen by defau= lt? If yes, could someone please point me to the related code in Xen for th= is interception? (anything to do with "switch_to_kernel in xen/arch/x8= 6/x86_64/entry.S"?) If no, then how could I intercept that instruction= in this case?=A0

(2) If a guest app uses "int 0x80" to launch = a system call, then is it true that after "init_int80_direct_trap,&quo= t; the int 0x80 is no longer intercepted by Xen, and the app can trap direc= tly into the guest kernel? My understanding is that "init_int80_direct= _trap" initializes vcpu's arch_vpuc.int80_bounce. Could someone pl= ease briefly explain how things work after this struct is properly setup? H= ow could I intercept system calls launched in this way in Xen?

Thanks.

X
--e0cb4efa6ed867e54004b91ac16d-- --===============6654557442869447091== 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 --===============6654557442869447091==--