From: Keir Fraser Subject: Re: bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry Date: Thu, 25 Nov 2010 17:16:25 +0000 Message-ID: References: <20101125150310.GA12431@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20101125150310.GA12431@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering , Tim Deegan Cc: Patrick Colp , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 25/11/2010 15:03, "Olaf Hering" wrote: >> The guest_physmap_add_entry code, and the p2m audit code, would be made >> more reliable if, say, alloc_domheap_pages and/or free_domheap_pages >> zapped the m2p entries for MFNs they touched. >> >> I think originally that wasn't done because the alloc is quickly >> followed by another write of the m2p but that's probably over-keen >> optimization. > > Could it be done like that? (not yet compile-tested) > The mfn is probably always valid. If you xap m2p in free_domheap_pages(), you shouldn't need to do it again in alloc_domheap_pages(). -- Keir