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] Page tables in Xen

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Page tables in Xen
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Mon, 3 Dec 2007 02:10:23 +0000
Cc: weiming <zephyr.zhao@xxxxxxxxx>, Haifeng He <hehaifeng2nd@xxxxxxxxx>, tgh <wwwwww4187@xxxxxxxxxxx>, Daniel Stodden <stodden@xxxxxxxxxx>
Delivery-date: Sun, 02 Dec 2007 18:11:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47535CA7.9090000@xxxxxxxxxxx>
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: <ab08258e0711280249x64d31ee8x7a51f392acae8477@xxxxxxxxxxxxxx> <1196315351.13722.14.camel@xxxxxxxxxxxxxxxxxxxx> <47535CA7.9090000@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
>   I am confused about shadow page table in the paravirtual mode in xen,
>   does guestOS have all of its own processes'page tables,and  xen keeps
> the very exactly all of the guestOS's processes page tables for a copy?
> or say ,it is xen  who keeps the only copy of the guestOS's processes
> page tables ,and guestOS  accesses to its processes's page tables
> through some hypercall? or ,what about it ?
>   If the guestOS has all of its processes's page talbes, while xen
> maintain the copy of all those page tables ,is it an inefficient usage
> of memory ,or what is the trick behind ?


The process owns all of the pagetables for its processes; Xen does not (in 
normal operation) maintain a shadow pagetable for PV domains.

In PV mode, Xen simply prevents a guest from loading a pagetable for use 
unless the guest has relinquished all rights to write to that memory.  i.e. a 
guest can only register a pagetable with Xen if there's no way that the guest 
can modify that pagetable directly.  This guarantees safety.

When the guest needs to update the pagetable, it can either write directly to 
it (which will cause a trap due to lack of permission, then Xen will check 
whether the update should be allowed) or it can call directly to Xen (which 
then does safety checks and does the update if it's OK).

Cheers,
Mark

> Thanks in advance
>
> Daniel Stodden 写道:
> > On Thu, 2007-11-29 at 11:00 +0530, pradeep singh rautela wrote:
> >> On Nov 29, 2007 1:42 AM, Haifeng He <hehaifeng2nd@xxxxxxxxx> wrote:
> >>> Thanks for answering my question. I am talking about PV mode. What
> >>> about shadow page table? Does it mean, Xen will keep (real) copies of
> >>> page tables?
> >>
> >> Shadown page tables are employed in HVM guests not PV guests.
> >
> > regarding shadowed PV domains, there's still
> > XENFEAT_auto_translated_physmap. but it's rather exotic and therefore
> > rarely used.
> >
> > regarding the original question: yes, this means xen keeps the real page
> > tables, while guests map pseudo-physical (i.e. linear) memory in what
> > they (may) believe to be the real ones.
> >
> > regards,
> > daniel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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