[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.