From: Tim Deegan Subject: Re: [PATCH 10/17] xenpaging: update machine_to_phys_mapping[] during page-in Date: Wed, 15 Dec 2010 10:47:54 +0000 Message-ID: <20101215104754.GL9912@whitby.uk.xensource.com> References: <20101206205907.848643876@aepfle.de> <20101206205911.611555011@aepfle.de> <20101214225837.GA27769@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <20101214225837.GA27769@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: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 22:58 +0000 on 14 Dec (1292367517), Olaf Hering wrote: > On Mon, Dec 06, Olaf Hering wrote: > > > Update the machine_to_phys_mapping[] array during page-in. The gfn is > > now at a different page and the array has still INVALID_M2P_ENTRY in the > > index. > > Does anyone know what the "best" location for this array update is? > p2m_mem_paging_prep() allocates a new page for the guest and assigns a > gfn to that mfn. So in theory the array could be updated right away, > even if the gfn will still have a p2m_ram_paging_* type until > p2m_mem_paging_resume() is called. I slightly prefer it where you have put it in this patch, but either would probably be fine. Tim. > Olaf > > > --- xen-unstable.hg-4.1.22459.orig/xen/arch/x86/mm/p2m.c > > +++ xen-unstable.hg-4.1.22459/xen/arch/x86/mm/p2m.c > > @@ -2827,6 +2827,7 @@ void p2m_mem_paging_resume(struct p2m_do > > mfn = gfn_to_mfn(p2m, rsp.gfn, &p2mt); > > p2m_lock(p2m); > > set_p2m_entry(p2m, rsp.gfn, mfn, 0, p2m_ram_rw); > > + set_gpfn_from_mfn(mfn_x(mfn), gfn); > > audit_p2m(p2m, 1); > > p2m_unlock(p2m); > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)