From: "Jan Beulich" Subject: Re: question about system call mechanism in xen Date: Mon, 17 Mar 2008 14:57:46 +0000 Message-ID: <47DE94FA.76E4.0078.0@novell.com> References: <20080317134328.5BEC1136934@ncic.ac.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20080317134328.5BEC1136934@ncic.ac.cn> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Zang Hongyong Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> "Zang Hongyong" 17.03.08 15:02 >>> >hi, > I'm interested in system call mechanism in Xen. My understanding = (guess) as follows. > 1)When user application makes a system call, a "int 80" will occur.=20 > 2)Then trap to Ring 0 (Which is hypervisor's location).=20 > 3)Then hypervisor redirect it to Guest OS's kernel to do system call = operation. > 4)Then back to Ring 0 > 5)back to user appliction > > Is that true? If everything is 32-bit, "int 80" will be used, but it'll be directed = directly to the guest kernel in ring 1 (i.e. the hypervisor isn't involved). If the hypervisor is 64-bit, things behave differently based upon what kind of kernel/app you're running and whether it's a AMD or Intel CPUs the system is equipped with. > Where can I get documents about this question in detail? Source code is probably the only reference. Jan