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 table question!

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] page table question!
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 13 Jun 2007 17:05:57 +0100
Cc: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, MT Rezaie <mmrezaie@xxxxxxxxx>
Delivery-date: Wed, 13 Jun 2007 13:56:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B02561E10@xxxxxxxxxxxxxxxxx>
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: <907625E08839C4409CE5768403633E0B02561E10@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> > I want to know any difference between writing, reading and shadow page
> > table (for example performance).
>
> Not sure exactly what you're asking for: are you asking about "writable"
> and "non-writable" page-table vs. shadow-page-table?

"Writable pagetables" is an interface introduced for Xen 3 PV guests to update 
their pagetables.  Previous versions of Xen required guests to be modified to 
make every update to their pagetables explicitly call into Xen (and 
explicitly batch those operations).  Writeable pagetables replace this by 
allowing updates to the pagetables to be implemented by the guest as attempts 
to write directly to them.  This isn't a trusted operation, however, since 
Xen uses page protections to prevent unvalidated writes going through...  
Right now this is implemented by trapping each attempt to write to the lower 
levels of the pagetables and emulating it in Xen.  Previous implementations 
were a bit more complicated but found to be unnecessary.

This interface does require the guest to do physical->machine translations 
(which are verified by Xen before installing them), and the guest actually 
works with the real pagetables (subject to certain restrictions).  As a 
result the guest can get data out of the real pagetables by doing a simple 
read - this operation should be as fast as native.  Updating pagetables is 
obviously a bit slower than native because Xen has to emulate them; explicit 
calls to Xen's batched update interface are used to give decent performance 
when lots of PTEs are being modified.

Does that answer your question, Mohammad?

> As of currently, Shadow-mode is only used for HVM (fully virtualized)
> domains. In this case, the guest has a "dummy" page-table that is not
> used by the processor for any memory accesses, instead a "shadow" (copy)
> of the guest's page-table is used. The shadow page-table is used by the
> processor. To make updates to the page-table appear in the
> shadow-page-table, the hypervisor is making sure that the
> guest-page-table is read-only, and when the guest writes to the
> page-table, we reproduce the write [with modification to reflect the
> difference between guest physical and machine physical address].

What Mats said :-)

One thing I've never been clear on for shadow mode is how accessed / dirty 
bits get propagated to the guest pagetable from the shadow.

At some point there was also support in Xen for fully translated shadowing of 
PV guests but I'm not sure this works now.  PV guests do still get shadowed 
in a limited way during live migration, however.

Cheers,
Mark

-- 
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