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

Re: [Xen-devel] Page tables in Xen


At 14:39 +0800 on 03 Dec (1196692743), tgh wrote:
> hi
> I am still confused about the shadow page table in the live migration 
> procession,
> in this procession, xen shadow page table copy each process's page 
> table in guestOS ,is it  right?

Xen makes a set of "shadow" pagetables for the guest to run on, which is
based on the guest's own pagetables.  CR3 points at the shadow
pagetables.  This is the same as for HVM guests, except in HVM Xen needs
to translate the entries from GFN to MFNs, and in PV live-migration it
only removes write access so that it can track dirtied pages.

> what formular is it used ,is it 
> something in the form of page talbe with 3 or 4 levels, or is it just an 
> array like p2m table ,or something?

It's a page table.  CR3 needs to point at something in the shape of a
page table and the guest's ones won't do.

>  and what does it  deal with? if it 
> is only for detecting which page entry is modified ,does it need a whole 
> copy of each process's page table in xen ,could an extended p2m table be 
> competent?

No.  The p2m is not used by the hardware in PV guests, and can't be used
by the hardware at all (except for HVM guests on the latest AMD chips
that support NPT).

It's not a full copy of every page table in the guest, by the way.  It's
demand-filled on page-faults and CR3 writes to contain the working set.

>  I am not very quite clear about the functions  of shadow page talbe in 
> PV mode for live migration ,I have read the live migration paper that 
> during the migration ,WWS should be detected and some mechanism should 
> be used if necessary, but could these be delt with using an extended p2m 
> talbe ,rather than a whole copy of the gurstOS process's page tables? or 
> there are some tricks behind these obviously inefficient usage of memory,

The memory use is not all that bad.  The main drawback of shadow
pagetables is the latency of previously simple operations like page

>  another confusion is the auto_translated_physmap or PV/autotranslated  
> mode   , does it  also need a whole shadow page table copy in xen? what 
> is form of the page table of this ,are these array or something of 3or 
> 4level page table,and what is the function ?

Auto-translated PV shadow mode uses all the same code for making shadow
pagetables as every other mode; it just includes a translation from GFN
to MFN when making the shadow PTEs.



Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems.
[Company #5334508: XenSource UK Ltd, reg'd c/o EC2Y 5EB, UK.]

Xen-devel mailing list



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