This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Intercept system call trap on Xen,

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Intercept system call trap on Xen,
From: Hui Kang <hkang@xxxxxxxxxxxxxxxxx>
Date: Tue, 7 Jun 2011 16:39:46 +0000
Accept-language: en-US
Delivery-date: Tue, 07 Jun 2011 09:40:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHMJTGD8xE4HqDuyk6EugVSer430A==
Thread-topic: Intercept system call trap on Xen,
I have a question regarding intercepting the system call from a guest kernel on hypervisor. I am using xen-4.0.1 with a PV-guest. 
To disable the fast system call which bypasses the hypervisor, I first comment out this lines in the file
      If (cur.vector == 0x80)
    /* init_int80_direct_trap(curr); */
To verify this, when I boot the kernel, I add printk and see that init_int80_direct_trap is not executed. 

Then in the function in the same file as above, do_guest_trap, I add a printk to trap the system call from guest kernel

Static void do_guest_trap…
If (trapnr == 0x80)
printk("System call from guest");

However, when I run some program in the guest kernel to issue some system call, the hypervisor does not print out the message. Can anyone help on this? Thanks. 

- Hui

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Intercept system call trap on Xen,, Hui Kang <=