From: weiming Subject: Re: how page faults are handled in paravirtualized xenguests? Date: Tue, 11 Mar 2008 10:43:59 -0400 Message-ID: References: <47D5E29E.9030706@sina.com.cn> <1205216487.31220.10.camel@thinkpad.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0157289288==" Return-path: In-Reply-To: <1205216487.31220.10.camel@thinkpad.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Stodden Cc: xen-devel , tgh , Keir Fraser List-Id: xen-devel@lists.xenproject.org --===============0157289288== Content-Type: multipart/alternative; boundary="----=_Part_1490_9333610.1205246639617" ------=_Part_1490_9333610.1205246639617 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline some material says that guest kernel runs in ring 1 and applications in rin= g 3. Is this for x86 32 ? On Tue, Mar 11, 2008 at 2:21 AM, Daniel Stodden wrote: > On Tue, 2008-03-11 at 09:38 +0800, tgh wrote: > > hi > > and that is ,in 64-bit,guest application entry into guestos kernel > > directly through SYSCALL,or not? > > no, you can't. programs use syscall to enter the kernel, and the kernel > is using syscall to enter xen. since you can only configure one entry > point at a time (and both xen and applications run in ring 3 anyway), > xen is handling all syscalls, then checks the context it was issued > from, and forwards the call to to the guest kernel if it was user code. > > regards, > daniel > > -- > Daniel Stodden > LRR - Lehrstuhl f=FCr Rechnertechnik und Rechnerorganisation > Institut f=FCr Informatik der TU M=FCnchen D-85748 Garching > http://www.lrr.in.tum.de/~stodden > mailto:stodden@cs.tum.edu > PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B > > > ------=_Part_1490_9333610.1205246639617 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline some material says that guest kernel runs in ring 1 and applications in rin= g 3. Is this for x86 32 ?

On Tue, Mar 11,= 2008 at 2:21 AM, Daniel Stodden <= stodden@cs.tum.edu> wrote:
On Tue, 2008-03-11 at 09:38 +0800, tgh wrote:
> hi
>   and that is ,in 64-bit,guest application entry into guestos ker= nel
> directly through SYSCALL,or  not?

no, you can't. programs use syscall to enter the kernel, and the = kernel
is using syscall to enter xen. since you can only configure one entry
point at a time (and both xen and applications run in ring 3 anyway),
xen is handling all syscalls, then checks the context it was issued
from, and forwards the call to to the guest kernel if it was user code.

regards,
daniel

--
Daniel Stodden
LRR     -      Lehrstuhl f=FCr Rechnertechnik und = Rechnerorganisation
Institut f=FCr Informatik der TU M=FCnchen         &nbs= p;   D-85748 Garching
htt= p://www.lrr.in.tum.de/~stodden         mailto:stodden@cs.tum.edu
PGP Fingerprint: F5A4 1575 4C56 E26A = 0B33  3D80 457E 82AE B0D8 735B



------=_Part_1490_9333610.1205246639617-- --===============0157289288== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0157289288==--