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] code read problems

Hi.

On Fri, 2008-02-29 at 14:44 +0800, tgh wrote:
> hi
>   I read checkpoint code
>   when checkpoint or migration ends,guestos continues processing by 
> returning back from hypercall of suspend, that is ,take_machine_down() 
> call the post_suspend() to continue ,is it right?
>   while in post_suspend(),pfn_to_mfn_frame_list_list[] is converted by 
> virt_to_mfn(),why do this convert? i could not find where it has been 
> converted,and why should it be converted back?

No, not converted. Re-initialized. 

Please compare post_suspend() with the original initialization at system
boot in setup_arch() (arch/x/kernel/setup-xen.c). It should come clear
then.

Observe that this is not canonicalization, because it is not the p2m,
but a directory containing the *machine frames* *carrying* the p2m.
Since the memory underlying the p2m has changed after resume, that
directory needs a reset.

>   and in the xc_domain_restore()in the dom0,pagetable has been 
> uncanonicalized, which is coupled with canonicalization in 
> xc_domain_save(),is it ? ,and what is the reasons for 
> pfn_to_mfn_frame_list_list[] virt_to_mfn in post_suspend()?
>   could you help me

Canonicalization forth and back is done by the migration code. Keeping
the allocated frame list up to date is done by the domain itself. I do
agree that this can be confusing indeed.

hth,
Daniel
 
-- 
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B



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