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: "Daniel Stodden" <stodden@xxxxxxxxxx>
Subject: Re: [Xen-devel] how page faults are handled in paravirtualized xenguests?
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Sat, 22 Mar 2008 22:29:30 -0400
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, tgh <wwwwww4187@xxxxxxxxxxx>
Delivery-date: Sat, 22 Mar 2008 19:29:56 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=5LEowQVexWO4SpkMD8Q7toarNLPPBQXTu9yKCKs465c=; b=pqniy3K9875VyTN6bAdCNnp6FThRsDDvKcvbhyTRJtCLpaMF+RDD7AS5vYKu8DQbU4wfjXXMA3UlZIv4oCX+td+FowbFVHybREGnX7W+/6CDYSjmb+RCvI3bPEZt60K8m68TcLvYdbhmhI/TcERD88oNIUkIt/u308ENUoPaEzs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=KtLgKMDKbMHeH7UFMGJvRG2RYTdVB1qCT/41gGgh+iJLEKnxoOfL9kA6jVC54VZGhFw1F+Z7FHlt1mnuG9XnI/tL1ocBj6AVuuhu/74xsmAoU1uC/E5WlZ20EiESddS22MqbxJ99swJ97xfxsnSWMW59uCQZ2oC0ZrwsNy26VLA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1205314655.6230.43.camel@xxxxxxxxxxxxxxxxxxxx>
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>
References: <C3F9C845.1DB90%keir.fraser@xxxxxxxxxxxxx> <47D5E29E.9030706@xxxxxxxxxxx> <1205216487.31220.10.camel@xxxxxxxxxxxxxxxxxxxx> <add59a3f0803110743j522b4373yce4981855161b7b@xxxxxxxxxxxxxx> <1205252780.31220.74.camel@xxxxxxxxxxxxxxxxxxxx> <1205314655.6230.43.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Daniel,

Now, I'm asking for more. :}

1) As you said, in 64-bit mode, PT switch is needed. But on your other post, you said:

"So instead one lets a process, its guest kernel and the VMM share one
virtual address space. As with regular OSes: one address space per guest
process. Control transfers between process, kernel and VMM does not
switch between virtual memories, but only privileges, stacks, and EIP.
-> much faster."

The statements above  implies that PT switch is not needed.  Is it true?

2) in 0/3/3 mode, how guest kernel protects it from application? Simply use different page tables? Will it be too costly (need TLB flush)? Why not use FS, GS to implement 0/1/3 mode?

Many thanks!
Weiming









On Wed, Mar 12, 2008 at 5:37 AM, Daniel Stodden <stodden@xxxxxxxxxx> wrote:
On Tue, 2008-03-11 at 17:28 +0100, Daniel Stodden wrote:
> 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,

i should probably correct myself. wrong story, sorry.

of course, paging distingushes ring 0-2 from 3.

so 32-bit in 0/1/3 with segmentation protects xen from the kernel, and
32-bit paging then protects xen and the kernel from user mode.

64-bit paging in 0/3/3 protects xen from both kernel and user mode, but
as i mentioned, you need a PT switch to keep the kernel safe.

maybe more than you asked for :}

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