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/
Home Products Support Community News


RE: [Xen-devel] Shadow Code Reorganization

To: "Gerd Knorr" <kraxel@xxxxxxx>
Subject: RE: [Xen-devel] Shadow Code Reorganization
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 27 Jul 2005 10:51:08 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Michael Vrable <mvrable@xxxxxxxxxxx>
Delivery-date: Wed, 27 Jul 2005 09:49:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWSfQiEtjgwh+ZGRHmD41U5Xx4ncAAEB5Nw
Thread-topic: [Xen-devel] Shadow Code Reorganization
> Ok, more general:  How does xen and/or the guest os handle 
> the changes in machine<=>phys mapping as they happen on 
> suspend/resume and migration because the guest gets a 
> different set of machine pages?  Especially the guest page 
> table updates?

The guest is notified that it should suspend itself. It should then get
its self into a 'safe' state i.e. ensure that no VCPUs are in the midst
of pagetable updates [*], create a suspend record, and then call the
suspend sched op hypercall. [upon resume, the sched op hypercall will
appear to return]

xc_linux_save is then responsible for reading the state out of the
domain, converting any pages containing pagetables (as indiciated by the
page type field) into 'canonical form' i.e. changing mfns into pfns.  At
restore time, xc_linux_restore will rewrite them to the new mfns.

The suspend record contains a page containing the list of mfns that make
up the p2m table for the guest. For PAE mode we'll need to extend this
table to cover larger phys memory sizes as it's only 1024 entries at


[*] We're currently mising code to get other VCPUs to safety. We could
hotunplug them, but its probably easiest just to have the VCPU that
executes the suspend thread count the others into a tasklet. The
save/restore code can trivially be extended to save multiple contexts.

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>