From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [RFC][PATCH] Basic support for page offline Date: Wed, 18 Feb 2009 15:20:20 +0000 Message-ID: <20090218152020.GB28209@york.uk.xensource.com> References: <20090213170341.GC17060@york.uk.xensource.com> <20090216143122.GD17060@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, At 14:51 +0000 on 18 Feb (1234968681), Jiang, Yunhong wrote: > Can you please share me which existing PET-updating code? I browsed > the code and didn't find approprate function, especially considering > we need update all level page tables. xen/arch/x86/mm.c: mod_l1_entry() mod_l2_entry(), etc. > Just as you stated before, there may have some corner case need > considered, grant table etc (some is missed in my previous patch). For > example, if guest has been granted, but the remote domain has not map > it (i.e. it is in grant_table->shared, but not been mapped still), > there should have no reference added, but if we don't hold the grant > table lock, then the backend may mapped a wrong mfn. Such situation is > difficult to be solved in tools. BTW, I suspect I may missed more > reference count, for example, the page may be pinned etc, I will > consider that in my next patch. It should be possible to have the tools do all the PTE manipulations with MMU update hypercalls (I think -- Keir may correct me here). Then the final hypercall to surrender the page will fail if the grant tables are wrong; if it does, put the PTEs back and fall back to a live migration. Isn't that what your in-xen code does anyway? > Also, as to your suggestion in previous mail of "since Xen is now > doing the hard work of pagetable manipulation, I don't think you even > need to suspend the guest -- just pausing it should be enough and is > much easier" As you already pointed out, I was wrong about that -- you need to suspend the guest to do the p2m manipulations. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]