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

Re: [Xen-devel] bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_

To: Olaf Hering <olaf@xxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry
From: Keir Fraser <keir@xxxxxxx>
Date: Thu, 25 Nov 2010 17:16:25 +0000
Cc: Patrick Colp <pjcolp@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 25 Nov 2010 09:17:20 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:cc:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=G44fOfdbr4n5/5QEIBSUPW5aaamC6koXMhXaXBZaYBQ=; b=O5zyU70kbKhnrm4REwKqrj4fHK5yff6FvlIgx3CpF+szkZGq6Kgdffhh+EICsOlfuc baZAXsteAGKt6lsDgO7foo/qLr7ZJsfDShfhGdMbEzSzpOT64CytMD+XaJlhuCWjWbEW QxX9EJWrVe7CV3CHa37/g1Du2QugeHa3K2uF8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=JT6t1Dd25v2naL1tP/KrYAz4LlIim3miTUnuGW4QXO+FS32HFfcqQ4al66M8D8ueiD mOrUfdT3F70vPNDyG5p+MytxcEsjw9wMh+V/LN5V8vEw+gqFFSZPhSt6PgWKmuwWRQu0 mGIg9gjad/8tFQ1tYSb/a14zs+gxbRi66xt40=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101125150310.GA12431@xxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuMxH0Rz7jRe3Xxh0SsSjxVmU+JWg==
Thread-topic: [Xen-devel] bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry
User-agent: Microsoft-Entourage/12.27.0.100910
On 25/11/2010 15:03, "Olaf Hering" <olaf@xxxxxxxxx> 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



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