From: Stefano Stabellini Subject: Re: [PATCH v6 5/5] xen: introduce XENMEM_pin Date: Mon, 30 Sep 2013 14:53:58 +0100 Message-ID: References: <1380298560-29352-5-git-send-email-stefano.stabellini@eu.citrix.com> <5249475C02000078000F7E43@nat28.tlf.novell.com> <20130930130323.GB8350@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VQdvv-0007Mx-NE for xen-devel@lists.xenproject.org; Mon, 30 Sep 2013 13:54:43 +0000 In-Reply-To: <20130930130323.GB8350@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: xen-devel , Ian.Campbell@citrix.com, Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 30 Sep 2013, Tim Deegan wrote: > > > > + { > > > > + rc = -EINVAL; > > > > + goto fail; > > > > + } > > > > + > > > > + rc = guest_physmap_pin_range(d, gpfn, pin.in.extent_order); > > > > + if ( rc ) > > > > + goto fail; > > > > + > > > > + for ( j = 0; j < (1UL << pin.in.extent_order); j++ ) > > > > + { > > > > + mfn = gmfn_to_mfn(d, gpfn); > > > > > > I'm afraid you didn't even build test this on x86: There's no > > > gmfn_to_mfn() there. > > > > Argh. On x86 I'll call get_gfn_unshare and ASSERT that the page is not > > shared (guest_physmap_pin_range is not implemented on x86 but it should > > have definitely unshared the page or failed doing so). > > On x86 can you not just ENOSYS the whole thing? Yeah, I guess it makes sense, but it requires an #ifdef in common code.