From: Olaf Hering Subject: Re: query the page type of a hvm page from within a hvm guest Date: Mon, 2 May 2011 11:56:48 +0200 Message-ID: <20110502095648.GB21248@aepfle.de> References: <20110407101202.GA31553@aepfle.de> <20110407111602.GI30961@whitby.uk.xensource.com> <20110502091744.GA15606@aepfle.de> <4DBE98FF020000780003F22F@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <4DBE98FF020000780003F22F@vpn.id2.novell.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: Jan Beulich Cc: "xen-devel@lists.xensource.com" , Tim Deegan List-Id: xen-devel@lists.xenproject.org On Mon, May 02, Jan Beulich wrote: > > + if (get_mem_type_supported) > > The name of the variable seems badly chosen, and the way you > coded this the code wouldn't be able to use the new interface > after migrating from an incapable hypervisor to a capable one. For the plain kdump usage thats probably ok. I think ballooned out oldmem pages will turn into ram pages during migration, but I'm not sure. > > + return -ENXIO; > > + > > + if (pfn == prev_pfn) > > + return prev_mem_type == HVMMEM_ram_rw; > > Did you in fact observe many immediately subsequent calls with > the same input (i.e. is the caching really worthwhile)? It depends on how expensive a hypercall is. read_from_oldmem() did read full pages in my testing. I think removing the caching and do the hypercall unconditional is ok. Olaf