From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [hybrid]: code review for function mapping pfn to foreign mfn Date: Mon, 16 Apr 2012 15:02:00 +0100 Message-ID: <20120416140200.GA13111@ocelot.phlegethon.org> References: <20120413182952.504e2775@mantra.us.oracle.com> <1334584402.14560.184.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1334584402.14560.184.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "Xen-devel@lists.xensource.com" , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org At 14:53 +0100 on 16 Apr (1334588002), Ian Campbell wrote: > On Sat, 2012-04-14 at 02:29 +0100, Mukesh Rathor wrote: > > Hi, > > > > I wrote up some code to map/unmap pfn to mfn for hybrid. I wonder if anyone > > can please look at it and give any comments. I tested it and seems to work > > ok. > > I'm not all that familiar with x86 p2m stuff but I'll try. (I've also > added Tim, who is familiar with this stuff) This is on my todo list for later this week. > > for (i=0; (rc == 0) && (i < pmapb.count); i++) { > > unsigned long fgmfn = pmapb.gmfn+i, gpfn = pmapb.gpfn+i; > > mfn = mfn_x(gfn_to_mfn_query(p2m_get_hostp2m(fdom), fgmfn, &p2mt)); > > I don't see gfn_to_mfn_query anywhere, I presume it's just a pretty > straight forward p2m lookup? Surprised there is no existing API but OK. Yes, it's a lookup with no PoD/paging/sharing side-effects. gfn_to_mfn_*() have been replaced by get_gfn()/put_gfn(), so at the very least this will have to be rebased across that change. Tim.