From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry Date: Thu, 25 Nov 2010 21:56:49 +0100 Message-ID: <20101125205649.GB26720@aepfle.de> References: <20101123210158.GA9425@aepfle.de> <20101124102202.GF19638@whitby.uk.xensource.com> <20101124144138.GA25619@aepfle.de> <20101124145326.GH19638@whitby.uk.xensource.com> <20101125150310.GA12431@aepfle.de> <20101125153216.GJ19638@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20101125153216.GJ19638@whitby.uk.xensource.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: Tim Deegan Cc: Patrick Colp , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, Nov 25, Tim Deegan wrote: > Good catch. It might be better to hook page_set_owner(), which ought to > imply that the old m2p info is stale. I had a quick look at all its > callers and I _think_ it would be OK, but I haven't tested that at > all. :) I tried page_set_owner(). Blindly adding set_gpfn_from_mfn there leads to compile errors, thanks to all the redefinitions of mfn_t related macros. Also, the page_set_owner() in alloc_heap_pages would cause Xen to crash early. It appears that maintaing machine_to_phys_mapping[] in free_domheap_pages() is enough to avoid the ASSERTS. Olaf