From: Tim Deegan Subject: Re: bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry Date: Thu, 25 Nov 2010 15:32:16 +0000 Message-ID: <20101125153216.GJ19638@whitby.uk.xensource.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline 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 Cc: Patrick Colp , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 15:03 +0000 on 25 Nov (1290697390), Olaf Hering wrote: > On Wed, Nov 24, Tim Deegan wrote: > > > The problem is that PV guests set their own m2p entries and can't be > > relied on to tear them down. > > What needs to happen for PV guests? > Dont they use the machine_to_phys_mapping[] array like HVM guests? They do, but they can put whatever they like in it, and don't have to clean up afterwards. > I see memory_exchange uses assign_pages() to move mfns from one domain > to another (havent studied the whole function yet). I think thats > another place that needs an audit wether the machine_to_phys_mapping[] > array is maintained properly. 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. :) Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)