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

Re: [Xen-devel] code read problems


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

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.

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



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