From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhai, Edwin" Subject: Re: memsize for HVM save/restore Date: Mon, 26 Mar 2007 11:13:18 +0800 Message-ID: <20070326031318.GZ21485@edwin-srv.sh.intel.com> References: <20070324113720.GX21485@edwin-srv.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Keir Fraser Cc: xen-devel@lists.xensource.com, Ewan Mellor , "Zhai, Edwin" List-Id: xen-devel@lists.xenproject.org On Sat, Mar 24, 2007 at 02:18:44PM +0000, Keir Fraser wrote: > On 24/3/07 11:37, "Zhai, Edwin" wrote: > > > But then qemu broke, because it also require the memsize to locate the share > > page. We can't use the previous method, as it requires a lot of changes in > > qemu. > > Doesn't your new 'general layout' patch put the PFNs of xenstore, ioreq, > buffered_ioreq in the saved image, and restore in xc_hvm_restore? Qemu-dm yes, > should obtain the addresses via HVMOP_get_param. > > You do not need the memsize parameter. 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. > > -- Keir > -- best rgds, edwin