From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V7 PATCH 5/7] pvh: change xsm_add_to_physmap Date: Tue, 28 Jan 2014 18:08:02 -0800 Message-ID: <20140128180802.152b3f8d@mantra.us.oracle.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> 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 1W8Kac-0006Dn-UJ for xen-devel@lists.xenproject.org; Wed, 29 Jan 2014 02:09:19 +0000 In-Reply-To: <52E7951802000078001177F6@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel , Ian Campbell , "stefano.stabellini@eu.citrix.com" List-Id: xen-devel@lists.xenproject.org On Tue, 28 Jan 2014 10:31:36 +0000 "Jan Beulich" wrote: > >>> On 28.01.14 at 02:55, Mukesh Rathor > >>> wrote: > > --- a/xen/common/memory.c > > +++ b/xen/common/memory.c .... > The only think x86-specific here is that {get,put}_pg_owner() may > not exist on ARM. But the general operation isn't x86-specific, so > there shouldn't be any CONFIG_X86 dependency here. Instead > you ought to work out with the ARM maintainers whether to stub > out those two functions, or whether the functionality is useful > there too (and hence proper implementations would be needed). > > In the latter case I would then also wonder whether the x86 > implementation shouldn't be moved into common code. Stefano/Ian: If you have use for get_pg_owner() I can stub it out for now and have it return 1, as NULL would result in error. Otherwise, I can change the function prototype to return rc with ARM always returning 0 and not doing anything, like: if ( xatpb.space == XENMAPSPACE_gmfn_foreign ) { if ( (rc = get_pg_owner(xatpb.foreign_domid, &fd)) ) { rcu_unlock_domain(d); return rc; } } which on ARM would always return 0, setting fd to NULL. If you think it would be needed in ARM, I can just leave the function prototype the same and you guys can implement whenever as I don't have the insight into ARM, and if it looks the same as x86 you can commonise it too. thanks Mukesh