From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncja6-0001Oi-Sn for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:04:02 -0500 Received: from [199.232.76.173] (port=45872 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncja6-0001OJ-EF for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:04:02 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncja5-0005zn-L7 for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:04:02 -0500 Received: from mail-px0-f189.google.com ([209.85.216.189]:37648) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ncja5-0005zf-BC for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:04:01 -0500 Received: by pxi27 with SMTP id 27so1578314pxi.4 for ; Wed, 03 Feb 2010 10:03:59 -0800 (PST) MIME-Version: 1.0 Date: Wed, 3 Feb 2010 11:03:59 -0700 Message-ID: <2e320c2d1002031003i36bc3848hbb4b030a6dfd4156@mail.gmail.com> From: Jong Chun Park Content-Type: multipart/alternative; boundary=000e0cd32a90f2d721047eb60abb Subject: [Qemu-devel] System call from a Guest Linux List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --000e0cd32a90f2d721047eb60abb Content-Type: text/plain; charset=ISO-8859-1 Hi, all? First of all, I apologize you for this spam. I'm working with QEMU v0.12.1 with i386 Linux guest on x86-64 Linux host. I'm trying to find a point in the source code where a system call from the guest OS is handled. If I'm not mistaken, QEMU disassembles an instruction of INT # in a switch statement of target-i386/translate.c and then calls helper_sysenter of target-i386/op_helper.c. The problem is how to tell difference between a system call of the guest OS and a system call of QEMU (I'm not sure of this, though). Assume the following code is executed after compilation in the guest OS: int main() { if (access("hello.txt", R_OK)!=0) { --000e0cd32a90f2d721047eb60abb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, all?

First of all, I apologize you for this spam. I'm wo= rking with QEMU v0.12.1 with i386 Linux guest on x86-64 Linux host. I'm= trying to find a point in the source code where a system call from the gue= st OS is handled. If I'm not mistaken, QEMU disassembles an instruction= of INT # in a switch statement of target-i386/translate.c and then calls h= elper_sysenter of target-i386/op_helper.c. The problem is how to tell diffe= rence between a system call of the guest OS and a system call of QEMU (I= 9;m not sure of this, though). Assume the following code is executed after = compilation in the guest OS:

int main() {
=A0=A0if (access("hello.txt= ", R_OK)!=3D0) {

--000e0cd32a90f2d721047eb60abb--