WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: memsize for HVM save/restore

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: memsize for HVM save/restore
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Tue, 27 Mar 2007 23:42:26 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Ewan Mellor <ewan@xxxxxxxxxxxxx>, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Tue, 27 Mar 2007 08:47:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C22DD015.4D29%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070326031318.GZ21485@xxxxxxxxxxxxxxxxxxxxxx> <C22DD015.4D29%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Mon, Mar 26, 2007 at 07:31:33PM +0100, Keir Fraser wrote:
> On 26/3/07 04:13, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx> 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

2 concerns:
1. xc_hvm_build use SCRATCH_PFN(0xFFFFF) to map shared_info, which would 
overwrite the true max_gpfn. So shall we add check in set_p2m_entry for this?

2. If qemu get the memsize from XENMEM_maximum_gpfn when restore, it's better 
to 
do the same thing when create, i.e. remove the '-m' qemu command line.

> 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
> 

-- 
best rgds,
edwin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel