WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] how page faults are handled in paravirtualized xenguests

To: weiming <zephyr.zhao@xxxxxxxxx>
Subject: Re: [Xen-devel] how page faults are handled in paravirtualized xenguests?
From: Daniel Stodden <stodden@xxxxxxxxxx>
Date: Tue, 11 Mar 2008 17:26:20 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, tgh <wwwwww4187@xxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 11 Mar 2008 09:28:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <add59a3f0803110743j522b4373yce4981855161b7b@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Fakultät für Informatik I10, Technische Universität München
References: <C3F9C845.1DB90%keir.fraser@xxxxxxxxxxxxx> <47D5E29E.9030706@xxxxxxxxxxx> <1205216487.31220.10.camel@xxxxxxxxxxxxxxxxxxxx> <add59a3f0803110743j522b4373yce4981855161b7b@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

-- 
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel