From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [hybrid]: code review for function mapping pfn to foreign mfn Date: Thu, 26 Apr 2012 11:18:48 -0700 Message-ID: <20120426111848.34e43e75@mantra.us.oracle.com> References: <20120413182952.504e2775@mantra.us.oracle.com> <20120419141527.GB23663@ocelot.phlegethon.org> <20120423183709.5636656f@mantra.us.oracle.com> <20120424093626.GC34721@ocelot.phlegethon.org> <20120424160643.531daf88@mantra.us.oracle.com> <20120426090847.GA67043@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120426090847.GA67043@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Keir Fraser , "Xen-devel@lists.xensource.com" , "stefano.stabellini@eu.citrix.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Thu, 26 Apr 2012 10:08:47 +0100 Tim Deegan wrote: > At 16:06 -0700 on 24 Apr (1335283603), Mukesh Rathor wrote: > > On Tue, 24 Apr 2012 10:36:26 +0100 > > Tim Deegan wrote: > > > > > At 18:37 -0700 on 23 Apr (1335206229), Mukesh Rathor wrote: > > > > On Thu, 19 Apr 2012 15:15:27 +0100 > > > > Tim Deegan wrote: > > > > >you still have this mapping. You should take a PGT_writeable_page > > >typecount, too, if the foreign domain isn't in paging_mode_external > > > > Ok, I've it as: > > if (paging_mode_external(fdom)) { > > if (get_page_from_pagenr(mfn, fdom) == 0) > > failed = 1; > > } else { > > if (get_page_and_type_from_pagenr(mfn, PGT_writable_page, > > fdom,0,0)) failed = 1; > > } > > > > But then later fails when it tries to pin the page, > > MMUEXT_PIN_L4_TABLE, from the lib at: > > What's trying to pin an l4 table? I thought your hybrid dom0 didn't > use the PV MMU. > > Tim. Right, hybrid doesn't use PV mmu. Here, xl/xc is building a pv guest while running on *hybrid* dom0. As a result, privcmd is calling this function to map foreign mfns to pfns: xc_dom_x86.c: arch_setup_bootlate -> pin_table -> xc_mmuext_op(). thanks, Mukesh