From: Ian Campbell Subject: Re: [V7 PATCH 5/7] pvh: change xsm_add_to_physmap Date: Mon, 10 Feb 2014 13:42:04 +0000 Message-ID: <1392039724.5117.94.camel@kazak.uk.xensource.com> References: <1387247911-28846-1-git-send-email-mukesh.rathor@oracle.com> <1387247911-28846-6-git-send-email-mukesh.rathor@oracle.com> <20140127175550.4cc67171@mantra.us.oracle.com> <52E7951802000078001177F6@nat28.tlf.novell.com> <20140128180802.152b3f8d@mantra.us.oracle.com> <1390992026.31814.63.camel@kazak.uk.xensource.com> <20140129113846.GA54797@deinos.phlegethon.org> <1390995662.31814.76.camel@kazak.uk.xensource.com> <20140129114837.GB54797@deinos.phlegethon.org> <1390996295.31814.84.camel@kazak.uk.xensource.com> <20140129173315.592e593e@mantra.us.oracle.com> <52F7B213.3000302@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WCr7i-00022d-1g for xen-devel@lists.xenproject.org; Mon, 10 Feb 2014 13:42:12 +0000 In-Reply-To: <52F7B213.3000302@linaro.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: Julien Grall Cc: xen-devel , Tim Deegan , Jan Beulich , "stefano.stabellini@eu.citrix.com" List-Id: xen-devel@lists.xenproject.org On Sun, 2014-02-09 at 16:51 +0000, Julien Grall wrote: > Hello Mukesh, > > On 30/01/14 01:33, Mukesh Rathor wrote: > >>> I'm not sure what you mean: > >>> - the code that Mukesh is adding doesn't have a struct page, it's > >>> just grabbing the foreign domid from the hypercall arg; > >>> - if we did have a struct page, we'd just need to take a ref to > >>> stop the owner changing underfoot; and > >>> - get_pg_owner() takes a domid anyway. > >> > >> Sorry, I was confused/mislead by the name... > >> > >> rcu_lock_live_remote_domain_by_id does look like what is needed. > > Following the xentrace tread: > http://www.gossamer-threads.com/lists/xen/devel/315883, > rcu_lock_live_remote_domain_by_id will not correctly works. > > On Xen on ARM, xentrace is using this hypercall to map XEN page (via > DOMID_XEN). In this case, rcu_lock_*domain* will always fails which will > prevent xentrace to works on Xen on ARM (and on PVH). I'm not sure how that extends to add_to_physmap though -- doing add to physmap of a DOMID_XEN owned page through the "back door" in this way isn't supposed to work. Ian.