From: Daniel Stodden Subject: Re: how page faults are handled in paravirtualized xenguests? Date: Tue, 11 Mar 2008 17:26:20 +0100 Message-ID: <1205252780.31220.74.camel@thinkpad.localdomain> References: <47D5E29E.9030706@sina.com.cn> <1205216487.31220.10.camel@thinkpad.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: weiming Cc: xen-devel , tgh , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Tue, 2008-03-11 at 10:43 -0400, weiming wrote: > some material says that guest kernel runs in ring 1 and applications > in ring 3. Is this for x86 32 ? yes. The ring1 kernel only works if you can play some tricks on virtual memory management in order to protect ring1 kernel memory from ring3 user space (paging alone only distinguishes 0 from 1-3). On x86_32, these tricks involve segmentation. x86_64 promotes 'flat' addressing instead, with only a few segment register left for convenience. So x86_32 runs in a '0/1/3' model (xen/kernel/user), while x86_64 has to fall back to a more general '0/3/3'. user versus supervisor mode is basically virtual. Xen will switch page tables when transferring control between user and kernel code. regards, daniel --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B