From: Keir Fraser Subject: Re: memsize for HVM save/restore Date: Mon, 26 Mar 2007 19:31:33 +0100 Message-ID: References: <20070326031318.GZ21485@edwin-srv.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070326031318.GZ21485@edwin-srv.sh.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Zhai, Edwin" Cc: xen-devel@lists.xensource.com, Ewan Mellor List-Id: xen-devel@lists.xenproject.org On 26/3/07 04:13, "Zhai, Edwin" wrote: > I don't think so. > Besides locating PFNs, memsize is also used in QEMU for other purpose, such as > bitmap allocation, dev init and map_foreign*. So memsize is a must for qemu > init. > > See following code in xc_hvm_build: > if ( v_end > HVM_BELOW_4G_RAM_END ) > shared_page_nr = (HVM_BELOW_4G_RAM_END >> PAGE_SHIFT) - 1; > else > shared_page_nr = (v_end >> PAGE_SHIFT) - 1; > > So it's impossible to get memsize by saved PFNs when restore a big memory > guest. It can use the new XENMEM_maximum_gpfn hypercall for bitmap allocation. I'm not sure what memsize would have to do with dev init. The map_foreign* is hidden behind mapcache which shouldn't need to know memsize (although if it's an issue of sizing buckets I suppose it can use XENMEM_maximum_gpfn). -- Keir