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

RE: [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
present. 

Ian

[*] 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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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