From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4pMH-0002ee-SL for qemu-devel@nongnu.org; Fri, 15 May 2009 00:49:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4pMB-0002e2-S7 for qemu-devel@nongnu.org; Fri, 15 May 2009 00:49:20 -0400 Received: from [199.232.76.173] (port=48708 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4pMB-0002dz-Nd for qemu-devel@nongnu.org; Fri, 15 May 2009 00:49:15 -0400 Received: from mail-qy0-f111.google.com ([209.85.221.111]:55348) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4pMB-0001mF-8u for qemu-devel@nongnu.org; Fri, 15 May 2009 00:49:15 -0400 Received: by qyk9 with SMTP id 9so3001861qyk.4 for ; Thu, 14 May 2009 21:49:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A0C5C48.6010700@yahoo.it> References: <877930.94637.qm@web28603.mail.ukl.yahoo.com> <200905141119.01914.paul@codesourcery.com> <4A0C184D.3030307@yahoo.it> <4A0C496B.3080601@redhat.com> <4A0C50D4.9020803@yahoo.it> <4A0C5985.6020206@redhat.com> <4A0C5C48.6010700@yahoo.it> Date: Fri, 15 May 2009 01:49:14 -0300 Message-ID: <5d6222a80905142149v18af9aa3jf30ba0cfd3363d26@mail.gmail.com> Subject: Re: [Qemu-devel] How does a system call work on QEMU? From: Glauber Costa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: grisu46 Cc: Avi Kivity , qemu-devel@nongnu.org On Thu, May 14, 2009 at 3:00 PM, grisu46 wrote: > Avi Kivity ha scritto: >> >> grisu46 wrote: >>>> >>>> No. =C2=A0Look at target-i386/translate.c, case 0x105 for syscall emul= ation. >>>> =C2=A0Eventually it ends up calling helper_syscall(). >>>> >>> >>> Simplify? >>> I am a newbie. >> >> Sorry, you're on your own. =C2=A0I can give you pointers but it's up to = you to >> follow them. =C2=A0If you're serious about understanding qemu you should= be >> prepared a lot of time reading the source code and processor documentati= on. >> > I would like to know how a virtualization program can perform a sensitive > but not privileged operation. I learn about Xen and I like to understand = (no > deep details need) differences between Xen paravirtualization and QEMU > emulator. > As the name suggests, qemu (in this case) is a processor _emulator_. You're= not doing any kind of sensitive operations on your host processor here. You are emulating a processor, an all state change happens in the emulated processor. * qemu reads the instruction. * qemu updates its internal state accordingly. * qemu reads next instruction. No big secret here. --=20 Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."