From: Hui Kang <hkang@cs.stonybrook.edu>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Intercept system call trap on Xen,
Date: Tue, 7 Jun 2011 16:39:46 +0000 [thread overview]
Message-ID: <CA13CC91.5DAF%hkang@cs.stonybrook.edu> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 846 bytes --]
Hi,
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
Xen/arch/x86/traps.c
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
[-- Attachment #1.2: Type: text/html, Size: 2275 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2011-06-07 16:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA13CC91.5DAF%hkang@cs.stonybrook.edu \
--to=hkang@cs.stonybrook.edu \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).