From: Daniel Stodden Subject: Re: code read problems Date: Fri, 29 Feb 2008 14:39:09 +0100 Message-ID: <1204292349.28990.12.camel@thinkpad.localdomain> References: <20080226095701.50167.qmail@dhost033.magnet.ch> <47C3F680.80102@sina.com.cn> <1204026247.10344.41.camel@thinkpad.localdomain> <47C52F58.1070008@sina.com.cn> <20080228185235.GA21515@ventoux.cs.ubc.ca> <47C7A9D5.7080502@sina.com.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <47C7A9D5.7080502@sina.com.cn> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: tgh Cc: Xen Developers List-Id: xen-devel@lists.xenproject.org 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=20 > returning back from hypercall of suspend, that is ,take_machine_down()=20 > call the post_suspend() to continue ,is it right? > while in post_suspend(),pfn_to_mfn_frame_list_list[] is converted by=20 > virt_to_mfn(),why do this convert? i could not find where it has been=20 > converted,and why should it be converted back? No, not converted. Re-initialized.=20 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=20 > uncanonicalized, which is coupled with canonicalization in=20 > xc_domain_save(),is it ? ,and what is the reasons for=20 > 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 =20 --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B