From: weiming Subject: Re: how page faults are handled in paravirtualized xenguests? Date: Tue, 11 Mar 2008 10:37:35 -0500 Message-ID: References: <47D5E29E.9030706@sina.com.cn> <1205216487.31220.10.camel@thinkpad.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1249112191==" Return-path: In-Reply-To: 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 --===============1249112191== Content-Type: multipart/alternative; boundary="----=_Part_1749_1841176.1205249855713" ------=_Part_1749_1841176.1205249855713 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline and how can xen tell if the hypercall is from kernel space or user space in x86_64? On Tue, Mar 11, 2008 at 9:43 AM, weiming wrote: > some material says that guest kernel runs in ring 1 and applications in > ring 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_1749_1841176.1205249855713 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline and how can xen tell if the hypercall is from kernel space or user space in= x86_64?

On Tue, Mar 11, 2008 at 9:43 AM,= weiming <zephyr.zhao@gmail.com= > wrote:
some material says that guest kernel runs in ring 1 and applications i= n ring 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 4= 57E 82AE B0D8 735B




------=_Part_1749_1841176.1205249855713-- --===============1249112191== 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 --===============1249112191==--